Skip to content
This repository has been archived by the owner on Jan 4, 2020. It is now read-only.

No write permissions on Packages folder of Marathon #151

Open
Jelle-elaut opened this issue Dec 6, 2017 · 27 comments
Open

No write permissions on Packages folder of Marathon #151

Jelle-elaut opened this issue Dec 6, 2017 · 27 comments

Comments

@Jelle-elaut
Copy link

Hello!
I tried installing the Xcode theme found on https://github.com/johnsundell/xcodetheme
Whenever I run the script, I get the following error:

馃挜 Failed to update packages 馃憠 Make sure you have write permissions to the folder '/Users/jelleelaut/.marathon/Packages/'

Even when I delete the .marathon folder, it gets recreated and I get the same error.
Thanks for the help!

@kaishin
Copy link

kaishin commented Dec 9, 2017

I have the same issue on 10.13.2.

@kaishin
Copy link

kaishin commented Dec 9, 2017

Try running the install command with the --verbose flag.

This doesn't seem to be related to permissions in my case, but rather to Swift version mismatch. That error message is misleading.

@schpaa
Copy link

schpaa commented Mar 24, 2018

The --enable-prefetching flag does not exists anymore.

馃弮  Updating packages...
   $ cd "/Users/chris/source/temp/" && /usr/bin/env xcrun --sdk macosx swift package --version
   Apple Swift Package Manager - Swift 4.1.0 (swiftpm-14050)
   $ cd "/Users/chris/.marathon/Packages/Generated/" && /usr/bin/env xcrun --sdk macosx swift package --enable-prefetching update
   error: unknown option --enable-prefetching; use --help to list available options
馃挜  Failed to update packages
馃憠  Make sure you have write permissions to the folder '/Users/chris/.marathon/Packages/'

@lilyball
Copy link

lilyball commented Apr 3, 2018

I'm getting this too. It's very user-unfriendly. In fact, attempting to install a package that uses an old version of Swift breaks Marathon entirely such that a simple marathon create foo.swift fails with this same incorrect error (as it tries to declare a dependency on the broken package, which SPM says it can't find).

@ghost ghost mentioned this issue Apr 9, 2018
@amadeu01
Copy link

amadeu01 commented Apr 9, 2018

I have the same issue on 10.13.4.

@j0d5
Copy link

j0d5 commented Apr 19, 2018

Same for me

@Sega-Zero
Copy link

@JohnSundell any news on this? Cannot use danger-swift because of it

@sunshinejr
Copy link
Collaborator

@Sega-Zero the problem with --enable-prefetching option is already fixed on version 2.1.0, released 5 hours ago. Did you try this one?

@Sega-Zero
Copy link

yep, it's still there. should I install danger-swift other way than brew to use a newer version of Marathon?

@sunshinejr
Copy link
Collaborator

Seems like John moved the prefered installation method from Homebrew to Make as the releases are delayed. Probably not there yet on brew, try using make instead and let us know!

@Sega-Zero
Copy link

Nope. It's still there:

danger process danger-swift
Updating packages...
$ cd "/Users/user/workspace/dir/" && /usr/bin/env xcrun --sdk macosx swift --version
Apple Swift version 4.1 (swiftlang-902.0.48 clang-902.0.37.1)
Target: x86_64-apple-darwin17.5.0
$ cd "/Users/user/.danger-swift/Packages/Generated/" && /usr/bin/env xcrun --sdk macosx swift package --enable-prefetching update
error: unknown option --enable-prefetching; use --help to list available options

Error:  TypeError: Cannot read property 'concat' of undefined
    at Object.exports.mergeResults (/usr/local/lib/node_modules/danger/distribution/commands/utils/reporting.js:15:32)
    at Object.<anonymous> (/usr/local/lib/node_modules/danger/distribution/commands/utils/runDangerSubprocess.js:99:51)
    at step (/usr/local/lib/node_modules/danger/distribution/commands/utils/runDangerSubprocess.js:32:23)
    at Object.next (/usr/local/lib/node_modules/danger/distribution/commands/utils/runDangerSubprocess.js:13:53)
    at /usr/local/lib/node_modules/danger/distribution/commands/utils/runDangerSubprocess.js:7:71
    at __awaiter (/usr/local/lib/node_modules/danger/distribution/commands/utils/runDangerSubprocess.js:3:12)
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/danger/distribution/commands/utils/runDangerSubprocess.js:87:48)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:891:16)
script returned exit code 1

Is there a way to tell danger-swift to use Marathon from /usr/local/bin?

@sunshinejr
Copy link
Collaborator

Oh, this seems like a Danger issue, not a Marathon one. We need a new release on brew. Not sure if it's possible to change the bin dependency, but you should be able to build danger-swift by cloning the repo and using make install. I suggest moving this convo to danger/swift#63 instead, so we won't spam this issue here 馃槈

@orta
Copy link
Collaborator

orta commented Apr 21, 2018

@lilyball
Copy link

The original issue can't only happen on high sierra, because it happened to me on sierra.

@mickmaccallum
Copy link

Can confirm the home brew issue. I had this problem when I installed with home-brew, but not after uninstalling and reinstalling with make.

@lilyball
Copy link

I had this problem when I installed using Mint.

@Viniciuscarvalho
Copy link

Viniciuscarvalho commented May 16, 2018

Still not working when trying to install with Swift 4.1 and homebrew?

馃挜  Failed to update packages
馃憠  Make sure you have write permissions to the folder '/Users/Vinicius.Marques/.marathon/Packages/'

@JohnSundell
Copy link
Owner

Would be really awesome if one of you who are experiencing this issue could spend some time debugging it and maybe come up with a solution? It doesn't happen to me on the latest master, so would be great if someone who can reproduce this on their machine could dig into it so we can find a fix 馃檪 I'm happy to answer any questions about the implementation if you need any help 馃憤

@lilyball
Copy link

@JohnSundell When I was hitting this problem, the trigger was attempting to install a package that uses an old version of Swift (and therefore doesn't compile with the current Swift). Have you tried doing something like that?

@JohnSundell
Copy link
Owner

@kballard Ah nice, I'm able to reproduce it now! Still don't know if and when I'll have time to work on a fix, but since we now have concrete reproduction steps it should be something anyone could jump in and debug 馃憤

@tranlily
Copy link

tranlily commented May 25, 2018

I came up with the solution.

If you are following the tutorial from: https://github.com/JohnSundell/XcodeTheme

You're suggesting to install Marathon using:
$ brew install marathon-swift

It's because it's not up to date. Given that you're using Xcode, I'm assuming you're on macOS. I followed these steps instead from: https://github.com/JohnSundell/Marathon

On macOS
Using Make (recommended):

$ git clone https://github.com/JohnSundell/Marathon.git
$ cd Marathon
$ make

After you have done this, then you can successfully run
$ marathon run johnsundell/xcodetheme

@haemi
Copy link

haemi commented Jul 3, 2018

@tranlily so there is no way with brew ? That's a pitty as I love the updating system of brew... When installing via make I always have to check for updates myself, right?

@JohnSundell
Copy link
Owner

JohnSundell commented Jul 13, 2018

I'd love for Marathon to fully support Homebrew and be updated regularly, but I personally don't use it and find dealing with Homebrew very time consuming, so chances are low I'll be motivated & able to find the time to keep it up to date. The best would be to set up some form of automatic pipeline so that new releases are automatically published on Homebrew. If someone wants to contribute something like that (if it's even possible) I'd be happy to add it 馃憤

@carlogilmar
Copy link

Today I tried to install with brew, but I couldn't... I had to install via make

@mxcl
Copy link

mxcl commented Oct 8, 2018

We submitted an update for marathon to brew, but in fact this exact error is occurring during the brew CI process:

Homebrew/homebrew-core#32338

@jsorge
Copy link

jsorge commented Mar 7, 2019

I created a new package and pushed a revision to it a couple fo days ago. It's using Swift 4.2 as the package version (the package is here: https://github.com/jsorge/maverick-models.git). When I try to add it to Marathon I get the same messages being reported here:

   Updating packages...
馃挜  Failed to update packages
馃憠  Make sure you have write permissions to the folder '/Users/jsorge/.marathon/Packages/'

If I remove the package all goes back to normal and I can edit scripts again.

I added a .swift-version and Package.swift files that indicate Swift 4.1 compatibility, and that seems to have resolved things.

@duemunk
Copy link

duemunk commented May 14, 2019

I'm still seeing this error message when running in a folder a folder with a & character (ampersand).

cd Test\&ing
marathon run johnsundell/xcodetheme --verbose

This outputs

馃弮  Cloning https://github.com/johnsundell/xcodetheme.git...
   $ cd "/Users/tobiasdm/.marathon/Scripts/Temp/https---github.com-johnsundell-xcodetheme.git/" && git clone https://github.com/johnsundell/xcodetheme.git clone -q
   
   $ cd "/Users/tobiasdm/.marathon/Scripts/Cache/-Users-tobiasdm-.marathon-Scripts-Temp-https---github.com-johnsundell-xcodetheme.git-clone-Install/" && readlink OriginalFile
   /Users/tobiasdm/.marathon/Scripts/Temp/https---github.com-johnsundell-xcodetheme.git/clone/Install.swift
   $ cd "/Users/tobiasdm/Desktop/Test&ing/" && /usr/bin/env xcrun --sdk macosx swift package --version
   /bin/bash: ing/: No such file or directory
馃挜  Failed to create a Package.swift file for the script
馃憠  Make sure you have write permissions to the folder '/Users/tobiasdm/.marathon/Scripts/Cache/-Users-tobiasdm-.marathon-Scripts-Temp-https---github.com-johnsundell-xcodetheme.git-clone-Install/'

Understandably this doesn't fly: /bin/bash: ing/: No such file or directory. So it seems that Marathon doesn't escape odd characters properly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests