Skip to content

Commit

Permalink
Add quotation marks to .sh-.bat installers
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaScheller committed May 8, 2024
1 parent 4214226 commit 4ae6d4e
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions tools/update_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ def install_release(
# App
lines.append("# Launch Houdini")
lines.append(
"pushd {} && source houdini_setup && popd".format(
"pushd '{}' && source houdini_setup && popd".format(
os.environ["HFS"]
)
)
Expand All @@ -647,7 +647,11 @@ def install_release(
# App
lines.append("# Launch Maya")
# Command
lines.append('{} "$@"'.format(os.path.join(os.environ["MAYA_LOCATION"], "bin", "maya")))
lines.append(
'"{}" "$@"'.format(
os.path.join(os.environ["MAYA_LOCATION"], "bin", "maya")
)
)
launch_file.writelines(line + "\n" for line in lines)
# Make executable
os.chmod(launch_file_path, 0o0777)
Expand All @@ -674,11 +678,17 @@ def install_release(
# App & command
if product_name == "houdini":
lines.append("REM Launch Houdini")
lines.append(os.path.join(os.environ["HFS"], "bin", "houdini"))
lines.append(
'"{}"'.format(os.path.join(os.environ["HFS"], "bin", "houdini"))
)
launch_file.writelines(line + "\n" for line in lines)
elif product_name == "maya":
lines.append("REM Launch Maya")
lines.append(os.path.join(os.environ["MAYA_LOCATION"], "bin", "maya"))
lines.append(
'"{}"'.format(
os.path.join(os.environ["MAYA_LOCATION"], "bin", "maya")
)
)
launch_file.writelines(line + "\n" for line in lines)
# Make executable
os.chmod(launch_file_path, 0o0777)
Expand Down

0 comments on commit 4ae6d4e

Please sign in to comment.