Skip to content

Commit

Permalink
fix(Diagnostic): Ignore completion check when -noprofile (#277)
Browse files Browse the repository at this point in the history
- Closes #274
  • Loading branch information
Ash258 committed Feb 9, 2022
1 parent dc9ad9b commit 6881b84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [0.6.5](https://github.com/Ash258/Scoop-Core/milestone/5)

- **Diagnostic**: Ignore completion check when `-noprofile` is used (cmd usage most likely)
- **commands**: Short option `-a` will not produce default architecture always
- Increase command startup
- Prevent MSI installations in NanoServer images
Expand Down
6 changes: 5 additions & 1 deletion lib/Diagnostic.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,11 @@ function Test-DiagCompletionRegistered {
[OutputType([bool])]
param()

# TODO: Test only when in user interactive mode
$passed = [Environment]::GetCommandLineArgs()
if ($passed -like '-noprofile' -or $passed -like '-nop*') {
return $true
}

$module = Get-Module 'Scoop-Completion'

if (($null -eq $module) -or ($module.Author -notlike 'Jakub*')) {
Expand Down

0 comments on commit 6881b84

Please sign in to comment.