question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] git aliases don't work

See original GitHub issue

Describe the bug Trying to use git aliases results in

environment: line 0: exec: az: not found

To Reproduce Azure Cli Version: 2.0.64 Azure-Devops extension version: 0.8.0

Steps to reproduce the behaviour:

> az devops configure --use-git-aliases yes
> git pr create
environment: line 0: exec: az: not found

Expected behaviour git pr should have same behaviour as az repos pr git repo should have same behaviour as az repos

Additional info Reproduced on windows in cmd and pwsh.

from .gitconfig

[alias]
	pr = "!f() { exec az repos pr \"$@\"; }; f"
	repo = "!f() { exec az repos \"$@\"; }; f"

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Jaykulcommented, May 17, 2019

The az command in the alias needs a .cmd added to it on Windows:

[alias]
	pr = "!f() { exec az.cmd repos pr \"$@\"; }; f"
	repo = "!f() { exec az.cmd repos \"$@\"; }; f"
1reaction
atbaggacommented, May 27, 2019

@qzdl Thank you for the suggested fix. We have taken the workaround for now until this gets fixed in Azure CLI. Feel free to raise a PR in the future for similar cases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git config alias doesn't work anymore - Stack Overflow
When i tried to use alias none worked. So, i added another alias using above command, but the file didn't get updated but...
Read more >
git-config Documentation - Git
An error message is produced if the file is unreadable, but not if it is missing. The files are read in the order...
Read more >
Why I'm not using Git aliases - tempertemper
Git aliases are incredibly useful, but there are five good reasons I've decided not to make use of them.
Read more >
8 Git aliases that make me more efficient - Opensource.com
However, defining aliases using Git offers several features that you don't get using the shell. First, it allows you to use aliases across ......
Read more >
Fun with Git aliases - DEV Community ‍ ‍
But what if you want to run multiple git commands in single alias. ... After you push the bug-fix branch to remote and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found