aboutsummaryrefslogtreecommitdiff
path: root/SBO-Lib/lib/SBO/Lib/Repo.pm
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2025-01-21 16:11:42 -0500
committerSlack Coder <slackcoder@server.ky>2025-01-28 11:31:35 -0500
commit921e9a76f1ca47d30d765f2f2bf61954e8ac9c9c (patch)
treeb2b0fa36ce53922c20538e8e5b4aeff8811eb2e0 /SBO-Lib/lib/SBO/Lib/Repo.pm
parentda89dd975499f6b228d75fa5f25871911fae658a (diff)
downloadsbotools2-921e9a76f1ca47d30d765f2f2bf61954e8ac9c9c.tar.xz
Avoid requiring root access
Make temporary folder generation lazy to postpone requiring root access until needed.
Diffstat (limited to 'SBO-Lib/lib/SBO/Lib/Repo.pm')
-rw-r--r--SBO-Lib/lib/SBO/Lib/Repo.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/SBO-Lib/lib/SBO/Lib/Repo.pm b/SBO-Lib/lib/SBO/Lib/Repo.pm
index 6c7babb..5337ea8 100644
--- a/SBO-Lib/lib/SBO/Lib/Repo.pm
+++ b/SBO-Lib/lib/SBO/Lib/Repo.pm
@@ -442,10 +442,10 @@ C<$repo_path>, and if not, offer to run C<sbosnap fetch> for you.
sub slackbuilds_or_fetch {
unless (chk_slackbuilds_txt()) {
say 'It looks like you haven\'t run "sbosnap fetch" yet.';
- if (prompt("Would you like me to do this now?", default => 'yes')) {
+ if (($< == 0) && prompt("Would you like me to do this now?", default => 'yes')) {
fetch_tree();
} else {
- say 'Please run "sbosnap fetch"';
+ say 'Please run "sbosnap fetch" as root';
exit 0;
}
}