Skip to content

Commit

Permalink
1.0.0.145 Export-XrmConnectionToBrowser : Fix bad parameters name
Browse files Browse the repository at this point in the history
  • Loading branch information
Aymeric committed Dec 20, 2023
1 parent 335fc1e commit 99df4c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions PowerDataOps.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Aymeric Mouillé
#
# Generated on: 08/12/2023
# Generated on: 12/20/2023
#

@{
Expand All @@ -12,7 +12,7 @@
RootModule = 'PowerDataOps'

# Version number of this module.
ModuleVersion = '1.0.0.144'
ModuleVersion = '1.0.0.145'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
12 changes: 6 additions & 6 deletions src/Browser/Export-XrmConnectionToBrowser.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,19 @@ function Export-XrmConnectionToBrowser {
}

# Provision profile folder
$profilePath = [IO.Path]::Combine($browserProfilesPath, $profileName);
$profilePath = [IO.Path]::Combine($browserProfilesPath, $ProfileName);
if (-not(Test-Path -Path $profilePath)) {
New-Item -ItemType Directory -Path $browserProfilesPath -Name $profileName -Force -ErrorAction Ignore | Out-Null;
New-Item -ItemType Directory -Path $browserProfilesPath -Name $ProfileName -Force -ErrorAction Ignore | Out-Null;

# Create shrotcut
Add-BrowserShortcut -BrowserShortCutsPath $BrowserShortCutsPath -BrowserAppPath $browserAppPath -ProfileName $profileName;
Add-BrowserShortcut -BrowserShortCutsPath $BrowserShortCutsPath -BrowserAppPath $browserAppPath -ProfileName $ProfileName;

# Start browser for folder initialization
Start-Browser -BrowserAppPath $browserAppPath -ProfileName $profileName;
Start-Browser -BrowserAppPath $browserAppPath -ProfileName $ProfileName;
Start-Sleep -Seconds 5;

# Configure chrome : Favorite bar
Set-BrowserFavoriteBarEnabled -ProfileName $profileName -ProfilePath $profilePath;
Set-BrowserFavoriteBarEnabled -ProfileName $ProfileName -ProfilePath $profilePath;

# Configure chrome : Extensions
$Extensions | ForEach-Object {
Expand All @@ -152,7 +152,7 @@ function Export-XrmConnectionToBrowser {
# Fix profile name
$browserStateFilePath = "$browserProfilesPath\Local State";
$localState = [IO.File]::ReadAllText($browserStateFilePath) | ConvertFrom-Json;
$localState.profile.info_cache.$profileName.name = $profileName;
$localState.profile.info_cache.$ProfileName.name = $ProfileName;
$localState | ConvertTo-Json -Depth 32 | Out-File -FilePath $browserStateFilePath -Encoding utf8 -Force;
}
end {
Expand Down

0 comments on commit 99df4c5

Please sign in to comment.