Skip to content

fix(install): check LASTEXITCODE after git commands in install.ps1#417

Open
phoenixikkifullstack wants to merge 1 commit into
Egonex-AI:mainfrom
phoenixikkifullstack:fix/install-ps1-exit-code-check
Open

fix(install): check LASTEXITCODE after git commands in install.ps1#417
phoenixikkifullstack wants to merge 1 commit into
Egonex-AI:mainfrom
phoenixikkifullstack:fix/install-ps1-exit-code-check

Conversation

@phoenixikkifullstack

Copy link
Copy Markdown

PowerShell's $ErrorActionPreference = 'Stop' only applies to cmdlets, not external commands like git. When git clone or git pull fails (e.g. network timeout), the script continued executing and crashed at Get-SkillNames because the repo directory didn't exist.

Add explicit $LASTEXITCODE checks after all git invocations (Clone-Or-Update and Cmd-Update) to halt immediately on failure.

Summary

Linked issue(s)

How I tested this

  • unlink the network which you prepare to executing install processing
  • install.ps1

Versioning

  • main branch

PowerShell's $ErrorActionPreference = 'Stop' only applies to cmdlets,
not external commands like git. When git clone or git pull fails (e.g.
network timeout), the script continued executing and crashed at
Get-SkillNames because the repo directory didn't exist.

Add explicit $LASTEXITCODE checks after all git invocations
(Clone-Or-Update and Cmd-Update) to halt immediately on failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant