Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chdir out of temp directory #220

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
2 participants
@oylenshpeegul
Copy link

commented Mar 17, 2013

When I install from github, my tempdir is not removed because I'm still in it.

chdir out of temp directory
When I install from github, my tempdir is not removed because I'm still in it.
@@ -1802,6 +1802,7 @@ DIAG
$self->diag("$msg\n", 1);
$self->{installed_dists}++;
$self->save_meta($stuff, $dist, $module_name, \@config_deps, \@deps);
chdir;

This comment has been minimized.

Copy link
@miyagawa

miyagawa Mar 17, 2013

Owner

no args chdir chdirs to HOME, which is not always set.

The other option is to have CLEANUP => 0 and let File::Temp's global destruction phase to delete them all.

This comment has been minimized.

Copy link
@oylenshpeegul

oylenshpeegul Mar 17, 2013

Author

Joel Berger suggested jotting down where we started and changing back to there.

http://oylenshpeegul.typepad.com/blog/2013/03/perl-modules-on-cpan-and-github.html?cid=6a0133f3b2732e970b017ee9698bd2970d#comment-6a0133f3b2732e970b017ee9698bd2970d

If we do that, I suppose we can safely have CLEANUP => 1

This comment has been minimized.

Copy link
@miyagawa

miyagawa Mar 17, 2013

Owner

Well sure, but there's also a (really confusing) difference between File::Temp->newdir and File::Temp::tempdir. I switched back to the functional tempdir() which cleans up the directory in the global destruction phase, which makes it unnecessary to chdiring out of the directory.

@miyagawa miyagawa closed this Mar 17, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.