Can't execute local deploy bash script


I’m trying to deploy with Waypoing by using a local shell script and unable to do so. Here is the error I’m getting:

» Deploying...
✓ Rendering templates...
❌ Executing command: bash ./ -e develop -t 2e054f43d0ded6121d265559ff87b401c9af6f3d
 │ /usr/bin/bash: ./ No such file or directory
! exit status 127

This is my waypoint.hcl:

project = "business"

app "app" {
  build {
    use "pack" {
      builder = ""

    registry {
      use "aws-ecr" {
        region = "sa-east-1"
        repository = "business"
        tag = gitrefpretty()

    use "exec" {
      dir = "./.gitops"
      command = ["bash", "./", "-e", "develop", "-t", gitrefpretty()]

Anyone knows what am I doing wrong?

Hey there @delucca - From what I see, it doesn’t look like the option dir actually does anything, so I think it was attempting to run ./ in the dir where you ran waypoint, not inside ./.gitops. You should be able to reference your script with the full path:

command = ["bash", "./.gitops/", "-e", "develop", "-t", gitrefpretty()]

Here’s my example with a simple bash script:

brian@localghost:nodejs % cat waypoint.hcl                                                                                                                                                                                        ±[●●][main]
project = "example-nodejs"

app "example-nodejs" {

 build {
   use "pack" {}
   registry {
       use "docker" {
         image = "nodejs-example"
         tag = "1"
         local = true

 deploy {
   use "exec" {
     command = ["bash", "./test/"]

brian@localghost:nodejs % tree test                                                                                                                                                                                               ±[●●][main]

0 directories, 1 file
brian@localghost:nodejs % cat test/                                                                                                                                                                                       ±[●●][main]
echo "hello"
brian@localghost:nodejs % waypoint up                                                                                                                                                                                             ±[●●][main]

» Building...
Creating new buildpack-based image using builder: heroku/buildpacks:18
✓ Creating pack client
✓ Building image
 │ [exporter] Adding 1/1 app layer(s)
 │ [exporter] Reusing layer 'launcher'
 │ [exporter] Reusing layer 'config'
 │ [exporter] Adding label 'io.buildpacks.lifecycle.metadata'
 │ [exporter] Adding label ''
 │ [exporter] Adding label 'io.buildpacks.project.metadata'
 │ [exporter] *** Images (059dc998151d):
 │ [exporter]
 │ [exporter] Reusing cache layer 'heroku/nodejs-engine:nodejs'
 │ [exporter] Reusing cache layer 'heroku/nodejs-engine:toolbox'
✓ Injecting entrypoint binary to image

Generated new Docker image: example-nodejs:latest
✓ Tagging Docker image: example-nodejs:latest => nodejs-example:1

» Deploying...
✓ Rendering templates...
✓ Executing command: bash ./test/
 │ hello

» Releasing...

» Pruning old deployments...
  Deployment: 01ES7CFD6G64ES6B5ACQX56FKX

The deploy was successful! A Waypoint deployment URL is shown below. This
can be used internally to check your deployment and is not meant for external
traffic. You can manage this hostname using "waypoint hostname."

Deployment URL:

I see we document dir here:

It doesn’t seem like it’s working!

  deploy {
    use "exec" {
      dir = "test"
      command = ["bash", "./"]
» Deploying...
✓ Rendering templates...
❌ Executing command: bash ./
 │ /bin/bash: ./ No such file or directory
! exit status 127

Must be a bug, I’ll go ahead and open a GitHub issue and report back once it’s created! Thanks. (edit: That issue now lives here:

Hi @briancain thanks for your assistance.

Indeed removing the dir option fixed the issue :slight_smile:

Also, thanks for creating the issue!

Sure thing @delucca! I’ve also opened a pull request to fix this up, so it should be resolved in the next release. Thanks for bringing this to our attention!

1 Like