Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Heroku build failure with cat: /tmp/<env_dir>/PORT: No such file or directory #10

@chrisbobbe

Description

@chrisbobbe

So far I'm getting a build failure with this output, after I click the "Deploy" button in Heroku.

Output:

-----> Building on the Heroku-20 stack
-----> Using buildpack: http://github.com/chrisbobbe/matterbridge-heroku.git#master
-----> Matterbridge app detected
cat: /tmp/d20210518-50-1ta64pb/PORT: No such file or directory
 !     Push rejected, failed to compile Matterbridge app.
 !     Push failed

It seems to be fixed without causing problems for my use case (a Zulip <-> Slack bridge) if I comment out this line in bin/support/bash_functions.sh; the line was added in 0665e38:

  if [ -d "$env_dir" ]; then
    for e in $(ls $env_dir); do
-     PORT="$(cat $env_dir/PORT)"
+     # PORT="$(cat $env_dir/PORT)"
      echo "$e" | grep -E "$whitelist_regex" | grep -qvE "$blacklist_regex" &&
        port_unexpanded=$(echo "$e=$(cat $env_dir/$e)") &&
        port_expanded=$(eval "echo $port_unexpanded") &&
        export $port_expanded
      :
    done
  fi

Does that seem like a good workaround, or can I expect things to go wrong in mysterious ways? Would it be better to revert 0665e38 entirely? I don't really know what that code is doing, and I haven't been able to determine why $env_dir/PORT might ever exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions