Skip to content

Commit

Permalink
Merge pull request #19 from suzuki-shunsuke/fix/create-root-bin-dir
Browse files Browse the repository at this point in the history
fix: create the directory AQUA_ROOT_DIR/bin
  • Loading branch information
suzuki-shunsuke authored Aug 25, 2021
2 parents 5dc2a4b + 7d5cdeb commit 467c9d9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/controller/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ func (ctrl *Controller) Install(ctx context.Context, param *Param) error { //nol
inlineRepo[pkgInfo.Name] = pkgInfo
}

if _, err := os.Stat(filepath.Join(ctrl.RootDir, "bin", "aqua-proxy")); err != nil {
rootBin := filepath.Join(ctrl.RootDir, "bin")

if err := os.MkdirAll(rootBin, 0o775); err != nil { //nolint:gomnd
return fmt.Errorf("create the directory: %w", err)
}

if _, err := os.Stat(filepath.Join(rootBin, "aqua-proxy")); err != nil {
if err := ctrl.installProxy(ctx); err != nil {
return err
}
Expand Down

0 comments on commit 467c9d9

Please sign in to comment.