Workaround options for handling default appman_location path
`export appman_location="$HOME/foo"; appman` works as expected but if the variable value is empty is it not using the default value.
```
wget -q https://raw.githubusercontent.com/ivan-hc/AM/main/AM-INSTALLER && chmod a+x ./AM-INSTALLER && ./AM-INSTALLER --install appman && rm ./AM-INSTALLER
source $HOME/.bashrc
export appman_location=""; appman
```
Output
```
...
--------------------------------------------------------------------------------------------------------------------------
>>> Thank you for choosing AppMan!
--------------------------------------------------------------------------------------------------------------------------
Before proceeding with any task, where do you want to install apps?
SYNTAX: /FULLPATH/TO/DIRNAME
EXAMPLE: /home/x/My-apps
NOTE: Any spaces in the path will be replaced for dashes
NOTE: If no input is given then "~/Applications" will be used as default
if you wish to later change the location, first remove all the programs and then edit the
"/home/x/.config/appman/appman-config" file.
--------------------------------------------------------------------------------------------------------------------------
Write the path or just press enter to use default:
```
### Proposed Workarounds
* **Handle Empty Variables:** Configure the script to fall back to the default path if the variable is left empty (e.g., `export appman_location="$HOME/foo"`).
* *Note:* AM-INSTALLER previously handled default locations for empty variable values elsewhere in the codebase; searching for `""` may help locate the reference.
* **Preserve Existing Paths:** Use a variable to define and retain the default path structure (e.g., `export appman_location="$appman_location"`).
1 条评论