Skip to content

dev/sg: make 'sg install' nicer to use for local dev

Administrator requested to merge sg-install-force into main

Created by: bobheadxi

Since sg update can no longer be used to globally install a custom build of sg, this PR makes a few improvements such that a one-liner like the following can easily be used to install sg globally (e.g. to test autocompletions):

go build -o ./sg ./dev/sg && ./sg install -f -p=false
  • --force, -f: Delete any existing sg installation and proceed immediately to installation
  • --profile, -p: When set to false, do not prompt for an update to profile files

Stacked on https://github.com/sourcegraph/sourcegraph/pull/33758

Test plan

go build -o ./sg ./dev/sg && ./sg install -f -p=false

Merge request reports

Loading