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

bugfix: Rename-Item path do not accept wildcard characters #143

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

idhyt
Copy link
Contributor

@idhyt idhyt commented Dec 18, 2024

执行安装命令会报错

Running post_install script...Rename-Item : 无法处理参数,因为参数“path”的值无效。请更改“path”参数的值,然后再次运行此操作。
所在位置 行:1 字符: 1
+ Rename-Item -Path "$dir\`$_*" -NewName "$version" -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Rename-Item],PSArgumentException
    + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.RenameItemCommand

查看官方 Rename-Item API

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/rename-item?view=powershell-7.4#-path

该函数的 path 不接受通配符

该仓库中还存在相似的问题

执行安装命令会报错

```ps
Running post_install script...Rename-Item : 无法处理参数,因为参数“path”的值无效。请更改“path”参数的值,然后再次运行此操作。
所在位置 行:1 字符: 1
+ Rename-Item -Path "$dir\`$_*" -NewName "$version" -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Rename-Item],PSArgumentException
    + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.RenameItemCommand
```

查看官方  `Rename-Item`  API

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/rename-item?view=powershell-7.4#-path

该函数的 `path` 不接受通配符

*该仓库中还存在相似的问题*
@idhyt idhyt requested a review from ivaquero as a code owner December 18, 2024 09:05
@ivaquero
Copy link
Owner

你想做管理员么?我可以加你

@ivaquero ivaquero merged commit 389e88f into ivaquero:master Dec 18, 2024
3 checks passed
@idhyt
Copy link
Contributor Author

idhyt commented Dec 18, 2024

感谢你的邀请,但是我可能没有太多时间来维护开源项目,不过我已经关注这个仓库并加入到我的bucket使用,后续有问题我会第一时间来提PR 🍻

@ivaquero
Copy link
Owner

行,有意向随时告诉我,这个仓库不大,涉及的脚本不多,不需要担心维护负担。

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

Successfully merging this pull request may close these issues.

2 participants