Skip to content

Commit 46d6ec6

Browse files
committed
Fix linter "prevent word splitting" error
1 parent eeb5ec0 commit 46d6ec6

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

examples/01_basic_example.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
# example: 01 - basic example
3-
source $(dirname $( realpath ${BASH_SOURCE[0]} ) )/../b-log.sh # include the script
3+
source "$(dirname "$( realpath ${BASH_SOURCE[0]} )" )"/../b-log.sh # include the script
44
LOG_LEVEL_ALL # set log level to all
55
FATAL "fatal level"
66
ERROR "error level"

examples/02_log_to_file_and_syslog.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
# example: 02 - log to file and syslog
3-
source $(dirname $( realpath ${BASH_SOURCE[0]} ) )/../b-log.sh # include the script
3+
source "$(dirname "$( realpath ${BASH_SOURCE[0]} )" )"/../b-log.sh # include the script
44
LOG_LEVEL_ALL # set log level to all
55
B_LOG --file log.txt --file-prefix-enable --file-suffix-enable
66
B_LOG --syslog '--tag b-log_example_02'

examples/03_custom_level_and_template.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
# example: 03 - custom log level and template
3-
source $(dirname $( realpath ${BASH_SOURCE[0]} ) )/../b-log.sh # include the script
3+
source "$(dirname "$( realpath ${BASH_SOURCE[0]} )" )"/../b-log.sh # include the script
44
LOG_LEVEL_ALL # set log level to all
55
FATAL "fatal level"
66
ERROR "error level"

examples/example.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ set -e # kill script if a command fails
1111
set -o nounset # unset values give error
1212
set -o pipefail # prevents errors in a pipeline from being masked
1313

14-
script_path=$(dirname $( realpath ${BASH_SOURCE[0]} ) ) # the path to the script
15-
source ${script_path}/../b-log.sh # include the log script
14+
script_path="$(dirname "$( realpath ${BASH_SOURCE[0]} )" )" # the path to the script
15+
source "${script_path}"/../b-log.sh # include the log script
1616

1717
echo "--------------------------------------------------"
1818
echo "Example of"

0 commit comments

Comments
 (0)