From 6a7134147e48a23831f085dbb2ad751ca151c229 Mon Sep 17 00:00:00 2001 From: spekulaas Date: Wed, 5 Oct 2022 00:58:02 +0200 Subject: [PATCH] privelages fix on bashrc --- src/applications/postman.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/applications/postman.sh b/src/applications/postman.sh index 8d44c0d..1acaf8a 100644 --- a/src/applications/postman.sh +++ b/src/applications/postman.sh @@ -1,3 +1,5 @@ +#!/bin/bash -i + # Get install file wget https://dl.pstmn.io/download/latest/linux64 @@ -6,14 +8,13 @@ sudo tar -xvf linux64 -C /usr/bin # export postman to env table if [[ $(which zsh) == "/usr/bin/zsh" ]]; then - echo '# Postman path' >> ~/.tempzshrc - echo 'export PATH="$PATH:/usr/bin/Postman"' >> ~/.tempzshrc - source ~/.tempzshrc + sudo -u $SUDO_USER echo '# Postman path' >> ~/.tempzshrc + sudo -u $SUDO_USER echo 'export PATH="$PATH:/usr/bin/Postman"' >> ~/.tempzshrc fi # always put in bashrc aswell, so that the user can always rely on the standard shell -echo '# Postman path' >> ~/.bashrc -echo 'export PATH="$PATH:/usr/bin/Postman"' >> ~/.bashrc +sudo -u $SUDO_USER echo '# Postman path' >> ~/.bashrc +sudo -u $SUDO_USER echo 'export PATH="$PATH:/usr/bin/Postman"' >> ~/.bashrc source ~/.bashrc # Create file and set info