summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-09-01 23:24:05 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-09-01 23:24:05 +0900
commitbd785ca07779bacf78b9678b3d19eef4754fcbae (patch)
treea44a39465e99fd893c6a38546c0cc802c4b97d34
parentfd4aad6d41da016f3a7aa7d3f130c39fe7bf082b (diff)
Restore pwd for each version
-rwxr-xr-xtool/make-snapshot2
1 files changed, 2 insertions, 0 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot
index 721636175e..d441f6218f 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -199,6 +199,7 @@ rescue => e
end
def package(vcs, rev, destdir, tmp = nil)
+ pwd = Dir.pwd
patchlevel = false
prerelease = false
if rev and revision = rev[/@(\h+)\z/, 1]
@@ -507,6 +508,7 @@ after-update::
end.compact
ensure
FileUtils.rm_rf(v) if v and !$exported and !$keep_temp
+ Dir.chdir(pwd)
end
if [$srcdir, ($svn||=nil), ($git||=nil)].compact.size > 1