bitrise-steplib / steps-set-xcode-build-number

Sets the Build Number to the specified value in the Info.plist file for the next build
MIT License
7 stars 10 forks source link

File doesn't exist at specified Info.plist when path contains whitespace #10

Closed lirossig closed 6 years ago

lirossig commented 6 years ago

Hi all,

I have spent one hour to understand that there is a problem when I try to use a path that contains a whitespace. Typically, my Info.plist file is in MyProject/Supporting Files folder.

I have tried to use the classical way $BITRISE_SOURCE_DIR/MyProject/Supporting\ Files/Info.plist as input variable but it doesn't work. I also try to use single quote around the whole path, double quote, etc.

I had a step before to ensure that the file was here, that the path was good (ls, cat, etc.) everything is good.

When I copy with a script the file in an other place (in MyProject/) without a whitespace everything is working.

Any idea ? Is it an issue or is there a specific way to use whitespaces in path ?

Thanks !

viktorbenei commented 6 years ago

Hi @lirossig , did you try to not escape it in any way? Simply specify it as $BITRISE_SOURCE_DIR/MyProject/Supporting Files/Info.plist in the input (in the workflow editor UI).

lirossig commented 6 years ago

Yes @viktorbenei I do and it fails :(

viktorbenei commented 6 years ago

Can you please share the full log of the step here?

lirossig commented 6 years ago

@viktorbenei Wow so weird... I have tried so many times, and I don't know why it just worked... with the space and no quote. I will try again on a full workflow and if it works again I will close the issue... I really do not understand.

Edit: @viktorbenei OK, the workflow continue... sorry and thank you for your support 👍

viktorbenei commented 6 years ago

No problem at all, Happy Building! ;)

michalcichon commented 5 years ago

I had the same issue and I solved it by copy-pasting the path from Terminal instead of typing it in the Workflow Editor directly. That's interesting because If I copy what I got previously by simply typing, it looks OK in most of the text editors, but not in vim (vim interprets this extra character as a space). It looks like Workflow Editor added some extra character after / in my case.

Typed (40 bytes):

<some_project>/⁨Supporting Files⁩/Info.plist

Copied (34 bytes):

<some_project>/Supporting Files/Info.plist