JohnSundell / SwiftPlate

Easily generate cross platform Swift framework projects from the command line
MIT License
1.77k stars 88 forks source link

Fails to clone repo .. 'Too many arguments' #10

Closed christoff-1992 closed 7 years ago

christoff-1992 commented 7 years ago

Hi there at the moment when I try to use SwiftPlate it fails to download the repo, correct me if I'm doing anything wrong. If you need further info more than happy to help. Just a heads up I normally use gitKrakken client but also have the git client installed, if it's a case of installing git via brew and making sure it's up-to-date I will proceed and feedback.

Thanks!

git version 2.8.4 (Apple Git-73)

DEBUG:

(lldb) expr dump(process.arguments) ([String]?) $R1 = 2 values { [0] = "-c" [1] = "git clone https://github.com/JohnSundell/SwiftPlate.git /Users/xxxxx/Documents/Personal Development/swiftplate_temp/SwiftPlate -q" }

INPUT:

Welcome to the SwiftPlate project generator 🐣 πŸ“¦ Where would you like to generate a project? (Leave empty to use current directory) /Users/xxxxx/Documents/Personal Development πŸ“› What's the name of your project? Test πŸ‘Ά What's your name? xxxxx xxxxx πŸ“« What's your email address (for Podspec)? You may leave this empty.

🌍 Any GitHub URL that you'll be hosting this project at (for Podspec)? You may leave this empty.


SwiftPlate will now generate a project with the following parameters: πŸ“¦ Destination: /Users/xxxxx/Documents/Personal Development πŸ“› Name: Test πŸ‘Ά Author: xxxxxx xxxxxxx

Proceed? βœ… (Y/N) Y πŸš€ Starting to generate project Test... πŸ‘‰ Removing any previous temporary folder... βœ… Done πŸ‘‰ Making temporary folder (/Users/xxxxx/Documents/Personal Development/swiftplate_temp)... βœ… Done πŸ‘‰ Making a local clone of the SwiftPlate repo... Too many arguments.

usage: git clone [] [--] [

]

-v, --verbose         be more verbose
-q, --quiet           be more quiet
--progress            force progress reporting
-n, --no-checkout     don't create a checkout
--bare                create a bare repository
--mirror              create a mirror repository (implies bare)
-l, --local           to clone from a local repository
--no-hardlinks        don't use local hardlinks, always copy
-s, --shared          setup as shared repository
--recursive           initialize submodules in the clone
--recurse-submodules  initialize submodules in the clone
--template <template-directory>
                      directory from which templates will be used
--reference <repo>    reference repository
--dissociate          use --reference only while cloning
-o, --origin <name>   use <name> instead of 'origin' to track upstream
-b, --branch <branch>
                      checkout <branch> instead of the remote's HEAD
-u, --upload-pack <path>
                      path to git-upload-pack on the remote
--depth <depth>       create a shallow clone of that depth
--single-branch       clone only one branch, HEAD or --branch
--separate-git-dir <gitdir>
                      separate git dir from working tree
-c, --config <key=value>
                      set config inside the new repository
-4, --ipv4            use IPv4 addresses only
-6, --ipv6            use IPv6 addresses only

βœ… Done πŸ‘‰ Copying template folder... An error was encountered πŸ™ Error: Error Domain=NSCocoaErrorDomain Code=260 "The folder β€œTemplate” doesn’t exist." UserInfo={NSFilePath=/Users/xxxxx/Documents/Personal Development//swiftplate_temp/SwiftPlate/Template, NSUserStringVariant=( Folder ), NSUnderlyingError=0x100905080 {Error Domain=NSOSStatusErrorDomain Code=-43 "fnfErr: File not found"}} Program ended with exit code: 0

christoff-1992 commented 7 years ago

Realised it was the spaces in the path causing the issue, have created a pull request for this.

JohnSundell commented 7 years ago

Implemented in #11