Skip to content
Browse files
update: explicitly run distri, not os.Args[0]
On distri, packages are hermetic¹ and their os.Args[0] is a full path that
identifies a specific version of the program.

  • Loading branch information
stapelberg committed May 9, 2020
1 parent f96d98b commit 76f76f80efbe0aa07e8277470ad1e4fe5ec581ef
Showing 1 changed file with 1 addition and 1 deletion.
@@ -58,7 +58,7 @@ func update(ctx context.Context, args []string) error {
return err

cmd := exec.Command(os.Args[0], append([]string{"update"}, args...)...)
cmd := exec.Command("distri", append([]string{"update"}, args...)...)
log.Printf("re-executing %v", cmd.Args)
// TODO: clean the environment
cmd.Env = append(os.Environ(),

0 comments on commit 76f76f8

Please sign in to comment.