Skip to content

Commit

Permalink
fix(dispatch): fix the dispatch script if bins aren't kept (#1972)
Browse files Browse the repository at this point in the history
Fixes #1995 
CRAFT-3696
  • Loading branch information
lengau authored Nov 21, 2024
1 parent 406fdb4 commit ad438d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion charmcraft/dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
DISPATCH_SCRIPT_TEMPLATE = """\
#!/bin/sh
dispatch_path="$(dirname $(realpath $0))"
python_path="${{dispatch_path}}/venv/bin/python"
venv_bin_path="${{dispatch_path}}/venv/bin"
python_path="${{venv_bin_path}}/python"
if [ ! -e "${{python_path}}" ]; then
mkdir -p "{{venv_bin_path}}"
ln -s $(which python3) "${{python_path}}"
fi
Expand Down

0 comments on commit ad438d6

Please sign in to comment.