beplus / fastlane-plugin-versioning_android

Android Versioning Plugin for Fastlane
MIT License
140 stars 25 forks source link

File Read Shell Escape Issue #6

Closed LuminousPath closed 2 years ago

LuminousPath commented 4 years ago

Hey

I noticed that when trying to read in the gradle file, when I was using a regular string vs the string that was coming in from the get_gradle_file_path I wasn't getting errors like Invalid argument @ rb_sysopen so I tried removing the shellescape portion and it got rid of the errors.

problem is (This might only be a windows thing) shellescape creates escaped double quotes: "\"C:/Users/Guy/Documents/Cool Project/project/android/build.gradle\"" vs "C:/Users/Guy/Documents/Cool Project/project/android/build.gradle"

and so causes issues when File.open or File.new tries to read it. Also by design the File class doesn't need shell escaped strings.

Made a pull request to fix it, not sure how many other people (if anyone) encountered this but it's a pretty straightforward fix

igorlamos commented 2 years ago

Thanks, @LuminousPath.

soethan99 commented 2 years ago

Not yet @igorlamos , I have open my issue in https://github.com/beplus/fastlane-plugin-versioning_android/issues/12