Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove-Alias conflicts with powershell core 7.0 built-in #18

Closed
moetayuko opened this issue Jun 4, 2020 · 6 comments · Fixed by #20
Closed

Remove-Alias conflicts with powershell core 7.0 built-in #18

moetayuko opened this issue Jun 4, 2020 · 6 comments · Fixed by #20
Assignees
Labels

Comments

@moetayuko
Copy link
Contributor

Got the following error when installing on PowerShell 7.0.1.

Install-Package: C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1:9709
Line |
9709 |  … talledPackages = PackageManagement\Install-Package @PSBoundParameters
     |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The following commands are already available on this system:'Remove-Alias'. This module
     | 'git-aliases' may override the existing commands. If you still want to install this module
     | 'git-aliases', use -AllowClobber parameter.

I'm unsure if they're equivalent, consider rename it or use the built-in function directly if it exists?

@issue-label-bot issue-label-bot bot added the bug label Jun 4, 2020
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.73. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@gluons
Copy link
Owner

gluons commented Jul 11, 2020

@dianlujitao Could you try PR #20?
I don't have PowerShell 7.

@moetayuko
Copy link
Contributor Author

Thanks for your response, I'm getting the following errors:

Remove-Alias: C:\Users\dianlujitao\Documents\PowerShell\Modules\git-aliases\0.2.2\aliases.ps1:4
Line |
   4 |  Remove-Alias gc
     |  ~~~~~~~~~~~~~~~
     | Alias was not removed because alias gc is constant or read-only.

Remove-Alias: C:\Users\dianlujitao\Documents\PowerShell\Modules\git-aliases\0.2.2\aliases.ps1:6
Line |
   6 |  Remove-Alias gcm
     |  ~~~~~~~~~~~~~~~~
     | Alias was not removed because alias gcm is constant or read-only.

Remove-Alias: C:\Users\dianlujitao\Documents\PowerShell\Modules\git-aliases\0.2.2\aliases.ps1:7
Line |
   7 |  Remove-Alias gcs
     |  ~~~~~~~~~~~~~~~~
     | Alias was not removed because alias gcs is constant or read-only.

Remove-Alias: C:\Users\dianlujitao\Documents\PowerShell\Modules\git-aliases\0.2.2\aliases.ps1:8
Line |
   8 |  Remove-Alias gl
     |  ~~~~~~~~~~~~~~~
     | Alias was not removed because alias gl is constant or read-only.

Remove-Alias: C:\Users\dianlujitao\Documents\PowerShell\Modules\git-aliases\0.2.2\aliases.ps1:9
Line |
   9 |  Remove-Alias gm
     |  ~~~~~~~~~~~~~~~
     | Alias was not removed because alias gm is constant or read-only.

Remove-Alias: C:\Users\dianlujitao\Documents\PowerShell\Modules\git-aliases\0.2.2\aliases.ps1:10
Line |
  10 |  Remove-Alias gp
     |  ~~~~~~~~~~~~~~~
     | Alias was not removed because alias gp is constant or read-only.

Remove-Alias: C:\Users\dianlujitao\Documents\PowerShell\Modules\git-aliases\0.2.2\aliases.ps1:11
Line |
  11 |  Remove-Alias gpv
     |  ~~~~~~~~~~~~~~~~
     | Alias was not removed because alias gpv is constant or read-only.

@gluons
Copy link
Owner

gluons commented Jul 12, 2020

Could to try running Remove-Alias gc -Force?
And try to use gc again. gc should be removed.

If it works, I'll use -Force with built-in Remove-Alias.

@moetayuko
Copy link
Contributor Author

Could to try running Remove-Alias gc -Force?
And try to use gc again. gc should be removed.

If it works, I'll use -Force with built-in Remove-Alias.

-Force works

@gluons
Copy link
Owner

gluons commented Jul 13, 2020

Release with v0.2.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants