Commit 38268010 authored by Emeric Verschuur's avatar Emeric Verschuur
Browse files

[settings] create parent settings file directory

parent 14f88ab2
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -661,6 +661,8 @@ bashopts_process_option() {
        if [ -n "$bashopts_tool_settings_path" ]; then
            # vrite the value to the setting file
            (
                test -d "$(dirname $bashopts_tool_settings_path)" || \
                    mkdir -p "$(dirname $bashopts_tool_settings_path)"
                if [ -f "$bashopts_tool_settings_path" ]; then
                    # remove old value
                    sed -i "/^$op=/d" $bashopts_tool_settings_path
+1 −1
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@ _test_case_10() {
}

_test_case_11() {
    bashopts_setup -n "$0" -d "Test case $0" -s /this/is/an/inacessible/file
    bashopts_setup -n "$0" -d "Test case $0" -s /dev/null/invalid

    bashopts_declare -n simple_val -s -l value -d "Simple value" -t string -v 'val'