Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

sudo check is missing in nhost sw upgrade #731

@hrmoller

Description

@hrmoller

I just ran nhost sw upgrade (on version) 1.0.5 which without prompting for sudo permissions attempted to upgrade to 1.1.0. However, the below error occurred as I was not sudo.

╰─❯ nhost sw upgrade
Upgrading to v1.1.0...
Copying to /usr/local/bin/nhost...
main.go:59: failed to rename /var/folders/0l/vrwslkvj26dc6pwjnhnq2c9w0000gn/T/nhost-cli-3142043354 to /usr/local/bin/nhost: rename /var/folders/0l/vrwslkvj26dc6pwjnhnq2c9w0000gn/T/nhost-cli-3142043354 /usr/local/bin/nhost: permission denied

On 1.1.0 it still seems as the upgrade can be executed without being sudo but I guess it can't be completed for the same reason as above.

As far as I remember there was a sudo check in the pre-1.0.0 versions of the nhost cli which is just nice for convenience.

Thread on Discord for reference: https://discord.com/channels/552499021260914688/1027264736842231948/threads/1119229893574656151

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions