helpers: Disallow removing the default profile with bash-it profile rm
This commit is contained in:
@@ -581,6 +581,12 @@ _bash-it-profile-rm() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Users should not be allowed to delete the default profile
|
||||||
|
if [[ $name == "default" ]]; then
|
||||||
|
echo -e "\033[91mCan not remove the default profile...\033[m"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
local profile_path="${BASH_IT}/profiles/$name.bash_it"
|
local profile_path="${BASH_IT}/profiles/$name.bash_it"
|
||||||
if [[ ! -f "$profile_path" ]]; then
|
if [[ ! -f "$profile_path" ]]; then
|
||||||
echo -e "\033[91mCould not find profile \"$name\"...\033[m"
|
echo -e "\033[91mCould not find profile \"$name\"...\033[m"
|
||||||
|
|||||||
Reference in New Issue
Block a user