irondash / cargokit

Integrate cargo build with flutter plugins and applications.
Other
51 stars 16 forks source link

fix insufficient sh permissions #65

Closed canxin121 closed 3 months ago

canxin121 commented 3 months ago

Origin issue: https://github.com/fzyzcjy/flutter_rust_bridge/issues/1840 Origin pr: https://github.com/fzyzcjy/flutter_rust_bridge/pull/1842

Simple problem description: if you create a new flutter_rust project in windows, the sh script is automatically created, but the executable permissions cannot be set. When moving this project to macOS and executing flutter build ios to build ipa files the process crashes due to insufficient sh script permissions.

This permission problem can be circumvented by sh script.sh rather than script.sh

As verified by Github Action's macOS Runner, the modified cargokit works fine for building ipa apps using the flutter_rust project created on windows.

Action Link

canxin121 commented 3 months ago

Now all tests runs well here: https://github.com/canxin121/todolist/actions/runs/8476136585 I've found that in android builds, run_build_tool.sh seems to be called directly outside of the gradle, and even if you use script.sh in the gradle, it still crashes due to permission issues. So I'm afraid that chmod is the most convenient solution

canxin121 commented 3 months ago

@knopp Can you take a look at this

knopp commented 3 months ago

Thanks!