Skip to content

Windows: in-app update fails under PowerShell (Get-FileHash not recognized), works in cmd #174

Description

@sosidudku1

Summary

In-app update fails on Windows when the installer runs under PowerShell: the install script exits with code 1 because Get-FileHash is not available. The same update succeeds when run from cmd.

Two users hit update problems independently, reported in Discord.

Error

· update failed: install script exited with code 1
· downloading atomic-agent-win32-x64.zip from AtomicBot-ai/atomic-agent ...
·  error: The term 'Get-FileHash' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.

Reported on v0.2.1, updating to v0.2.2.

User feedback

"when you try to update the app using powershell it fails (tried updating at a project directory not system32), but when i tried the same thing using cmd it worked."

A second user, on the same day:

"I have not been able to update atomic agent while inside TUI ever (always received some kind of errors, didnt have the time to report though) and suggest irm https://atomicagent.io/install.ps1 | iex in powershell (which works without any problem)"

So the standalone install command works; it is the update path that breaks.

Notes

Get-FileHash ships with PowerShell 4.0+ on Windows PowerShell, and is present in PowerShell Core, but it is missing in older or trimmed environments. The install script appears to depend on it for checksum verification without checking availability or falling back.

Worth deciding:

  • Should the script fall back to certutil -hashfile (present on all supported Windows versions) when Get-FileHash is unavailable?
  • Should a failed checksum step abort the update, or warn and continue?
  • Why does the same script succeed under cmd — different shell resolution path, or is a different code path taken entirely?

Impact

Updating is the most basic operation there is. Users who cannot update stay on older builds carrying bugs we have already fixed, and Windows PowerShell is the default shell most of them will use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions