Skip to content

Commit 9f742b9

Browse files
committed
query: some macos fixes
1 parent 59d44e9 commit 9f742b9

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

scripts/generateVersion.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ HASH=${HASH-$(git rev-parse HEAD)}
1616
BRANCH=${BRANCH-$(git branch --show-current)}
1717
MESSAGE=${MESSAGE-$(git log -1 --pretty=%B | head -n 1 | sed -e 's/#//g' -e 's/\"//g')}
1818
DATE=${DATE-$(git show --no-patch --format=%cd --date=local)}
19-
DIRTY=${DIRTY-$(git diff-index --quiet HEAD && echo -n clean || echo -n dirty)}
19+
DIRTY=${DIRTY-$(git diff-index --quiet HEAD && echo clean || echo dirty)}
2020
TAG=${TAG-$(git describe --tags)}
2121
COMMITS=${COMMITS-$(git rev-list --count HEAD)}
2222

src/core-modules/core-modules.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ void core_plugins_start(const Config& config)
245245

246246
term_pid = get_terminal_pid();
247247
term_name = get_terminal_name();
248-
if (hasStart(str_tolower(term_name), "login") || hasStart(term_name, "init") || hasStart(term_name, "(init)"))
248+
if (hasStart(str_tolower(term_name), "login") || hasStart(term_name, "/dev/tty") || hasStart(term_name, "init") || hasStart(term_name, "(init)"))
249249
{
250250
is_tty = true;
251251
term_name = ttyname(STDIN_FILENO);

src/core-modules/macos/disk.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static bool get_disk_info(const callbackInfo_t* callbackInfo, struct statfs* fs)
7575
die("Module disk doesn't have an argmument to the path/device to query");
7676

7777
const std::string& path = callbackInfo->moduleArgs->value;
78-
return (statfs(path.c_str(), fs) != 0);
78+
return (statfs(path.c_str(), fs) == 0);
7979
}
8080

8181
MODFUNC(disk_fsname)

0 commit comments

Comments
 (0)