-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install/uninstall script #285
Conversation
…e with import-module locking local dll files
tools/scripts/script.ps1
Outdated
|
||
function Get-PowerShellVersion { | ||
if ([version]$PSVersionTable.PSVersion -lt [version]"7.4.6") { | ||
Write-Warning "[PowerShell version 7.4.6 is the minimum requirement for AIShell module, exiting...]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write-Warning "[PowerShell version 7.4.6 is the minimum requirement for AIShell module, exiting...]" | |
Write-Error "PowerShell v7.4.6 is required for using the AIShell module." |
I think we should add more content to the message about where to get v7.4.6 PowerShell. Maybe point to the release page https://aka.ms/PowerShell-Release?tag=v7.4.6? /cc @StevenBucher98, thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed we should add where they can install PS 7.4.6
tools/scripts/script.ps1
Outdated
elseif ($osArchitecture -eq "Arm64") { | ||
$buildUrl = $osxArm64Url | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no error handling for unsupported architectures
tools/scripts/script.ps1
Outdated
} | ||
|
||
# Download AIShell Module | ||
$tempFilesDirectory = Join-Path $destinationDirectory "temp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module will be installed from PowerShellGallery with Install-Module
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment was marked as outdated.
This comment was marked as outdated.
tools/scripts/script.ps1
Outdated
$processPath += ";" | ||
} | ||
$aishPath = Get-InstallDirectoryForCurrentOS | ||
[Environment]::SetEnvironmentVariable("PATH", $processPath + $aishPath, "Process") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only adding to the process-scope Path doesn't persist the setting. Running aish
won't work from a different PowerShell session.
On Unix platform, we don't manipulate the Path environment variable directly, but instead create a symbolic link in a well-known folder that's already in the Path. Think about how Az CLI does it when installing on mac and Linux.
@calvinhzy @StevenBucher98 Given the issues with the script and the tight timeline, I rewrote some of the install script to get it ready for try-out and iterative updates. Make sure you sync this branch if you are making code updates. |
tools/scripts/script.ps1
Outdated
if ($Uninstall) { | ||
Uninstall-AIShellModule | ||
} else { | ||
Install-AIShellModule |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Mac, "Currently the AIShell PowerShell module will only work in iTerm2 terminal and still has limited support but if you would like to test it, you can install it with Install-PSResource -Name AIShell -Repository PSGallery -Prerelease
. The aish executable is added to your path, please run aish to use the standalone experience"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved, but not tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and confirmed working
Co-authored-by: Steven Bucher <[email protected]>
Co-authored-by: Steven Bucher <[email protected]>
Co-authored-by: Steven Bucher <[email protected]>
Co-authored-by: Steven Bucher <[email protected]>
Co-authored-by: Steven Bucher <[email protected]>
Co-authored-by: Steven Bucher <[email protected]>
Co-authored-by: Steven Bucher <[email protected]>
Co-authored-by: Steven Bucher <[email protected]>
Co-authored-by: Steven Bucher <[email protected]>
Co-authored-by: Steven Bucher <[email protected]>
Co-authored-by: Steven Bucher <[email protected]>
Co-authored-by: Steven Bucher <[email protected]>
PR Summary
Add the installation script to facilitate the AIShell installation and uninstallation.