How To

Find the answers to your Go questions, including FAQs, how-tos, tips and tricks

This is a public Discussion Area  publicRSS

How To

    Chris Stevenson
    Cruise can't run my scripts
    How To posted August 5, 2009 by Chris Stevenson
    1135 Views
    Title:
    Cruise can't run my scripts
    Problem:

    When I try to run my scripts on unix using the exec task it fails with the error "Make sure this command can execute manually" even though the script is there and is executable.

    Solution Description:

    When you use the exec task on linux, it works the same way as if you were typing the command from a command prompt. This means that to run a script in the working directory you would need to add "./" to the executable path.

    So this would give an error:

    <exec workingDir="foo/bar" command="my-script.sh" />
    

    But this would work:

    <exec workingDir="foo/bar" command="./my-script.sh" />
    

    Also, the script must be marked as executable. If the script is not marked as executable you may need to specify the full path to the appropriate shell:

    <exec workingDir="foo/bar" command="/bin/bash">
      <arg value="my-script.sh" />
    </exec>