@b4n commented on this pull request.


> -if git.found()
+if git.found() and fs.is_dir('.git')
        ret = run_command(git, 'rev-parse', '--short', '--revs-only', 'HEAD', 
check: true)
        cdata.set_quoted('REVISION', ret.stdout().strip())
 else

So what about something like this (untested at all, and I barely know Meson):
```meson
revision = '-1'
if git.found():
    ret = run_command(git, 'rev-parse', '--short', '--revs-only', 'HEAD', 
check: false)
    if ret.return_code() == 0:
        revision = ret.stdout().strip()
cdata.set_quoted('REVISION', revision)
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3578#pullrequestreview-1663042882
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3578/review/[email protected]>

Reply via email to