Skip to content

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

@aleksey-chugaev

Description

@aleksey-chugaev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions