Skip to content

Commit

Permalink
create-production-venv: Fix symlink creation.
Browse files Browse the repository at this point in the history
The install script was failing on 2nd+ attempts if the first attempt
was interrupted.

This failure happened because zulip-venv already existed at
`current_venv_path`. Changing the `ln` command's flags from `-s` to
`-nsf` should make this part of the script idempotent.
  • Loading branch information
theopen-institute authored and timabbott committed May 21, 2017
1 parent a2f5d13 commit 7eaa1fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/lib/create-production-venv
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ cached_venv_path = setup_virtualenv(
virtualenv_args=['-p', 'python{}'.format(python_version)])

current_venv_path = os.path.join(args.deploy_path, 'zulip-current-venv')
run(['ln', '-s', venv_name, current_venv_path])
run(['ln', '-nsf', venv_name, current_venv_path])
# Now the virtualenv has been activated

0 comments on commit 7eaa1fa

Please sign in to comment.