From d349aa0169455473175416328c3eae824a74fb58 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Fri, 21 Aug 2015 23:51:09 +0100 Subject: [PATCH] Use /tmp instead of parent dir for fork cloning. --- src/nimblepkg/publish.nim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/nimblepkg/publish.nim b/src/nimblepkg/publish.nim index 75bd6c3..4629e48 100644 --- a/src/nimblepkg/publish.nim +++ b/src/nimblepkg/publish.nim @@ -126,8 +126,7 @@ proc getPackageOriginUrl(a: Auth): string = proc publish*(p: PackageInfo) = ## Publishes the package p. let auth = getGithubAuth() - let parent = os.getCurrentDir().parentDir() - var pkgsDir = parent / "nimble-packages-fork" + var pkgsDir = getTempDir() / "nimble-packages-fork" if not forkExists(auth): createFork(auth) echo "waiting 10s to let Github create a fork ..." @@ -136,7 +135,7 @@ proc publish*(p: PackageInfo) = pkgsDir = readLineFromStdin("Directory where to clone into: ") if pkgsDir.len == 0: userAborted() echo "... done; cloning packages into: ", pkgsDir - cd parent: + cd getTempDir(): doCmd("git clone https://github.com/" & auth.user & "/packages " & pkgsDir) # Use SSH instead of HTTPS so that the user isn't bothered with the # password for 'git push':