about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-06-17 21:23:49 +0530
committerAndinus <andinus@nand.sh>2020-06-17 21:23:49 +0530
commit60da73fabbb1214fe053a7d13ebff71f729519f3 (patch)
tree0a039a7e795d147875446d0e3bc31926ac58567a
parent67a171cbb85572434e4ebe34a18145095e2f1c86 (diff)
downloadcrux-60da73fabbb1214fe053a7d13ebff71f729519f3.tar.gz
Move unveil call further down
-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.