Closed Bug 1787601 Opened 2 years ago Closed 2 years ago

mach vendor rust --ignore-modified failed in non git repository: "no such subcommand: `vet`"

Categories

(Firefox Build System :: Mach Core, defect)

Firefox 104
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: alex.fan.q, Unassigned)

Details

Steps to reproduce:

run mach vendor rust --ignore-modified when firefox src is not managed in a git repository. Or simply, mv .git no_git

Actual results:

With .git, this command works perfectly.
With .git renamed or removed, it fails with

error: no such subcommand: `vet`                                                                                    
                                                                                                                    
        Did you mean `new`?                                                                                         
Error running mach:                                                                                                 
                                                                                                                    
    ['vendor', 'rust', '--ignore-modified']

I tried to track down the problem, and found in https://github.com/mozilla/gecko-dev/blob/2f47697ff541a61c26deabece15365f6cbac7728/python/mozbuild/mozbuild/mach_commands.py#L214 , bootstrap_toolchain("cargo-vet") returns null, whereas in normal case, it returns /home/alexfanqi/.mozbuild/cargo-vet

The Bugbug bot thinks this bug should belong to the 'Firefox Build System::Mach Core' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Mach Core
Product: Firefox → Firefox Build System

Sorry, didn't realise mach vendor rust is not intended to be used with non git/vcs src previously.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.