From 921e9a76f1ca47d30d765f2f2bf61954e8ac9c9c Mon Sep 17 00:00:00 2001 From: Slack Coder Date: Tue, 21 Jan 2025 16:11:42 -0500 Subject: Avoid requiring root access Make temporary folder generation lazy to postpone requiring root access until needed. --- SBO-Lib/lib/SBO/Lib/Repo.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'SBO-Lib/lib/SBO/Lib/Repo.pm') 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 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; } } -- cgit v1.2.3