Skip to content

Commit 1d9c0f0

Browse files
committed
make dotfiles install scripts executable
1 parent 164b816 commit 1d9c0f0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cli/dotfiles.go

+7
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,13 @@ func (r *RootCmd) dotfiles() *clibase.Cmd {
196196
// it is safe to use a variable command here because it's from
197197
// a filtered list of pre-approved install scripts
198198
// nolint:gosec
199+
200+
// making selected script executable
201+
err = os.Chmod(filepath.Join(dotfilesDir, script), 0o755)
202+
if err != nil {
203+
return xerrors.Errorf("chmod %s: %w", script, err)
204+
}
205+
199206
scriptCmd := exec.CommandContext(inv.Context(), filepath.Join(dotfilesDir, script))
200207
scriptCmd.Dir = dotfilesDir
201208
scriptCmd.Stdout = inv.Stdout

0 commit comments

Comments
 (0)