LoginSignup
0
0

More than 3 years have passed since last update.

golangのos/execでMakefileのmakeコマンドを実行しようとすると2回目以降の実行がエラーになる

Posted at

原因

わからん

対処方法

シェルでmakeコマンドを呼び出すようにする

Go側

  • フルパスじゃなくても大丈夫のはず

        cmd := exec.Command("/home/yuta/AWS/go/bin/exec.sh", domain.Name)
        cmd.Run()

シェル側

  • 事前にchmodで実行権限をつけてあげる
exec.sh
#!/bin/sh

cd /home/yuta/AWS
make make-env-config ENV_FILE=.env DOMAIN_NAME=${1}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0