Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esacape shell args to allow paths with spaces. #31

Merged
merged 2 commits into from
Dec 31, 2023

Conversation

esiegel
Copy link
Collaborator

@esiegel esiegel commented Dec 29, 2023

This should hopefully fix the issue on windows where output paths with spaces are causing bad inputs to the executable. It seems that using the normalizePath function on windows will convert relative paths to absolute paths, where on MacOS this isn't the case. This is why the issue of spaces in paths only has been reported by windows users.

@@ -1,5 +1,59 @@
#!/usr/bin/env bash

echo "-----------RUNNING MOCK LOUPER EXECUTABLE--------------"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bash script now verifies that the arguments passed in are valid

@@ -1,5 +1,66 @@
@echo off

echo "-----------RUNNING MOCK LOUPER.BAT EXECUTABLE--------------"
echo Arguments passed to the script: %*
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

batch script verifies arguments

:parse_args
if "%~1" equ "" goto :check_paths

if /i "%~1" equ "--input" (
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "%~1" will strip any surrounding quotes around the argument, but it seems to do wonky things depending on if there is a space between the equal sign. --output="some path"vs--output = "some apth"`

@esiegel esiegel merged commit 4fe1246 into main Dec 31, 2023
3 checks passed
@esiegel esiegel deleted the esiegel/escape_shell_args branch December 31, 2023 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant