We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
v doctor
1 parent a1d9450 commit 4eed91eCopy full SHA for 4eed91e
1 file changed
cmd/tools/vdoctor.v
@@ -237,6 +237,11 @@ fn (mut a App) cpu_info(key string) string {
237
}
238
239
fn (mut a App) git_info() string {
240
+ // Check if in a Git repository
241
+ x := os.execute('git rev-parse --is-inside-work-tree')
242
+ if x.exit_code != 0 || x.output.trim_space() != 'true' {
243
+ return 'N/A'
244
+ }
245
mut out := a.cmd(command: 'git -C . describe --abbrev=8 --dirty --always --tags').trim_space()
246
os.execute('git -C . remote add V_REPO https://github.com/vlang/v') // ignore failure (i.e. remote exists)
247
if '-skip-github' !in os.args {
0 commit comments