source command not found in sh shell

前端 未结 12 738
温柔的废话
温柔的废话 2020-11-28 02:14

I have a script that uses sh shell. I get an error in the line that uses the source command. It seems source is not included in my

12条回答
  •  时光取名叫无心
    2020-11-28 03:00

    This problem happens because jenkins Execute Shell runs the script via its /bin/sh

    Consequently, /bin/sh does not know "source"

    You just need to add the below line at the top of your Execute Shell in jenkins

    #!/bin/bash
    

提交回复
热议问题