about summary refs log tree commit diff stats
path: root/crux.pl
diff options
context:
space:
mode:
Diffstat (limited to 'crux.pl')
-rwxr-xr-xcrux.pl12
1 files changed, 6 insertions, 6 deletions
diff --git a/crux.pl b/crux.pl
index 0950b68..50d72c6 100755
--- a/crux.pl
+++ b/crux.pl
@@ -108,12 +108,6 @@ foreach my $path ( sort keys %unveil ) {
         or die "Unable to unveil: $!\n";
 }
 
-# Unveil $PATH.
-foreach my $path ( split(/:/, $ENV{PATH}) ) {
-    unveil( $path, "rx" )
-        or die "Unable to unveil: $!\n";
-}
-
 my $response = UnsplashSource::get( %options );
 
 if ( $options{debug} ) {
@@ -125,6 +119,12 @@ if ( $options{debug} ) {
 die "Unexpected response\n"
     unless $response->{status} == 302;
 
+# Unveil $PATH.
+foreach my $path ( split(/:/, $ENV{PATH}) ) {
+    unveil( $path, "rx" )
+        or die "Unable to unveil: $!\n";
+}
+
 run3 ["feh", "--bg-fill", "$response->{headers}{location}"];
 
 # Block further unveil calls.