Checks for an argument before setting a project

This fixes the bug where pushing esc whilst rofi menu is open would set
the project path to the main projects folder
master
Jonathan Hodgson 4 years ago
parent 940c4e89f9
commit 3f5663c362
  1. 1
      bin/.bin/project-management/project-switch

@ -33,6 +33,7 @@ function unset_project(){
} }
function set_project(){ function set_project(){
[ -z "$1" ] && exit 1
local switchto="$PROJECTS_PATH/$1" local switchto="$PROJECTS_PATH/$1"
if [ -d "$switchto" ]; then if [ -d "$switchto" ]; then
if [ -L "$SYMLINC" ]; then if [ -L "$SYMLINC" ]; then

Loading…
Cancel
Save