forked from external/yambar
main: allow reading alternative config from pipe
This commit is contained in:
parent
bdc4fbe8e7
commit
8b1fa13686
2 changed files with 4 additions and 2 deletions
|
@ -23,6 +23,8 @@
|
|||
### Changed
|
||||
|
||||
* log-level: default to `warning`
|
||||
* Read alternative config from pipes (e.g. `--config /dev/stdin`)
|
||||
([#340][340]).
|
||||
|
||||
### Deprecated
|
||||
### Removed
|
||||
|
|
4
main.c
4
main.c
|
@ -223,8 +223,8 @@ main(int argc, char *const *argv)
|
|||
if (stat(optarg, &st) == -1) {
|
||||
fprintf(stderr, "%s: invalid configuration file: %s\n", optarg, strerror(errno));
|
||||
return EXIT_FAILURE;
|
||||
} else if (!S_ISREG(st.st_mode)) {
|
||||
fprintf(stderr, "%s: invalid configuration file: not a regular file\n",
|
||||
} else if (!S_ISREG(st.st_mode) && !S_ISFIFO(st.st_mode)) {
|
||||
fprintf(stderr, "%s: invalid configuration file: neither a regular file nor a pipe\n",
|
||||
optarg);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue