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

Not able to run plugin without sudo (or rather install dependencies) #4

Open
aleksey-chugaev opened this issue Jun 5, 2019 · 0 comments

Comments

@aleksey-chugaev
Copy link

My work laptop is partially locked and I can't use sudo to install xcodeproj globally. I can however use bundler to install it locally into vendor/bundle. So a workaround for me is to include a Gemfile in my project:

gem 'xcodeproj', '1.7.0'

Install it with bundle install --path vendor/bundle.
And then modify plugin to change ruby build/projimport.rb for bundle exec ruby build/projimport.rb:

...
val scriptArgs = mutableListOf(
        "exec",
        "ruby",
        "build/projimport.rb",
        config.projectPath!!,
        config.target!!,
        config.group,
        File(project.projectDir, "src").path)

    val std = ByteArrayOutputStream()
    val err = ByteArrayOutputStream()
    val result = projectExec(project,
        "bundle",
        null,
        scriptArgs,
        std,
        err
    )
...

Would be good if the plugin could support this, either via a flag in plugin config or by scanning project files to check if a bundler is used.
I could raise a PR if you could advice a preferred way to implement this.

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

No branches or pull requests

1 participant