Skip to content

Commit af2b139

Browse files
committed
Changed:
- Output the app name in message that the app is running interactively Fixed: - Configuration file failing to load
1 parent d9b08e2 commit af2b139

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
- none
11+
12+
## [1.2.1] - 2024-11-29
13+
1014
### Changed
1115

1216
- Output the app name in message that the app is running interactively
1317

18+
### Fixed
19+
20+
- Configuration file failing to load
21+
1422
## [1.2.0] - 2024-11-29
1523

1624
### Added

noirwatch

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# App version and name
99
APP_NAME="NoirWatch"
10-
VERSION=1.2.0
10+
VERSION=1.2.1
1111
LAST_UPDATED="2024-11-29"
1212

1313
# TODO:
@@ -1075,7 +1075,7 @@ parse_arguments() {
10751075
process_arguments() {
10761076

10771077
# Default configuration file location
1078-
CONFIG_FILE="$(get_config_path "$CONFIG_FILE")"
1078+
[[ "$CLI_CONFIG_FILE" = false ]] && CONFIG_FILE="$(get_config_path "$CONFIG_FILE")"
10791079
CACHE_DIR="$(get_temp_path "$CACHE_DIR")"
10801080
LOG_FILE="$CACHE_DIR/$LOG_FILE"
10811081
PID_FILE="$CACHE_DIR/$PID_FILE"
@@ -1088,7 +1088,9 @@ process_arguments() {
10881088
[[ "$SHOW_HELP" = true ]] && show_help
10891089

10901090
# Override config settings with command line options
1091-
[[ "$INIT" = false ]] && load_config "$CONFIG_FILE"
1091+
if [[ -z "$INIT" || "$INIT" = false ]]; then
1092+
load_config "$CONFIG_FILE"
1093+
fi
10921094
[[ -n "$CLI_VERBOSE" ]] && VERBOSE="$CLI_VERBOSE"
10931095
[[ -n "$CLI_CACHE_DIR" ]] && CACHE_DIR="$CLI_CACHE_DIR"
10941096

@@ -1113,8 +1115,8 @@ process_arguments() {
11131115
[[ -n "$CLI_CHECK_INTERVAL" ]] && CHECK_INTERVAL="$CLI_CHECK_INTERVAL"
11141116
[[ -n "$CLI_TIMEOUT" ]] && TIMEOUT="$CLI_TIMEOUT"
11151117
[[ -n "$CLI_THRESHOLD" ]] && THRESHOLD="$CLI_THRESHOLD"
1116-
[[ "$SHOW_CONFIG" = true ]] && show_config && show_version && exit
11171118
[[ "$SHOW_CONFIG_FILE" = true ]] && show_config_file
1119+
[[ "$SHOW_CONFIG" = true ]] && show_config && show_version && exit
11181120
[[ "$INIT" = true ]] && init_config
11191121

11201122
# Override URL settings with command line options

noirwatch.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH NOIRWATCH 1 "November 29, 2024" "NoirWatch 1.2.0" "User Commands"
1+
.TH NOIRWATCH 1 "November 29, 2024" "NoirWatch 1.2.1" "User Commands"
22
.SH NAME
33
NoirWatch \- Monitor specified websites for changes and send notifications.
44
.SH SYNOPSIS

0 commit comments

Comments
 (0)