Skip to content

Commit

Permalink
use the POSIX-standard . to execute commands
Browse files Browse the repository at this point in the history
Use the portable and POSIX-standard '.' to execute commands in scripts
on non-Windows platforms rather than the non-portable 'source' command.

Note that on FreeBSD, source is not provided by the default install or
shell.
  • Loading branch information
jjhelmus authored and jezdez committed Jun 5, 2023
1 parent 449c48c commit 506f0a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conda_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -3206,7 +3206,7 @@ def write_build_scripts(m, script, build_file):
with open(work_file, "w") as bf:
# bf.write('set -ex\n')
bf.write("if [ -z ${CONDA_BUILD+x} ]; then\n")
bf.write(f" source {env_file}\n")
bf.write(f" . {env_file}\n")
bf.write("fi\n")
if script:
bf.write(script)
Expand All @@ -3232,7 +3232,7 @@ def _write_test_run_script(
with open(test_run_script, "w") as tf:
tf.write(
'{source} "{test_env_script}"\n'.format(
source="call" if utils.on_win else "source",
source="call" if utils.on_win else ".",
test_env_script=test_env_script,
)
)
Expand Down

0 comments on commit 506f0a2

Please sign in to comment.