diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cpt-lib | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cpt-lib b/src/cpt-lib index a975a64..c841da1 100644 --- a/src/cpt-lib +++ b/src/cpt-lib @@ -198,7 +198,7 @@ pkg_find() { done done - unset IFS + IFS=$old_ifs # A package may also not be found due to a repository not being # readable by the current user. Either way, we need to die here. @@ -1267,7 +1267,7 @@ pkg_fetch() { # Create a list of all repositories. # See [1] at top of script. # shellcheck disable=2046,2086 - { IFS=:; set -- $CPT_PATH; unset IFS; } + { IFS=:; set -- $CPT_PATH; IFS=$old_ifs ;} # Update each repository in '$CPT_PATH'. It is assumed that # each repository is 'git' tracked. @@ -1517,6 +1517,9 @@ main() { # This is used enough to warrant a place here. uid=$(id -u) + # Save IFS, so we can restore it back to what it was before. + old_ifs=$IFS + # Make sure that the CPT_ROOT doesn't end with a '/'. This might # break some operations. [ -z "$CPT_ROOT" ] || [ "${CPT_ROOT##*/}" ] || { |