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

Additional helpful information in error messages. #571

Merged
merged 2 commits into from Mar 18, 2019

Conversation

kquick
Copy link
Contributor

@kquick kquick commented Jun 30, 2018

No description provided.

@@ -425,7 +425,7 @@ sub run {
sub grab {
my (%args) = @_;
my $res = run(%args, grabStderr => 0);
die "command `@{$args{cmd}}' failed with exit status $res->{status}" if $res->{status};
die "command `@{$args{cmd}}' failed with exit status $res->{status} in $args{dir}" if $res->{status};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is dir guaranteed to be set?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the same file: return grab(cmd => ["nix", "cat-store", "--store", getStoreUri(), "$path"]);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this. I don't normally work in Perl, so I missed the hindmost check in

chdir $args{dir} or die "changing to $args{dir}" if defined $args{dir};

@grahamc grahamc merged commit 8a41ea5 into NixOS:master Mar 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants