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

Very problematic when you continue this function. #19

Open
ajdinaliu opened this issue Nov 16, 2020 · 0 comments
Open

Very problematic when you continue this function. #19

ajdinaliu opened this issue Nov 16, 2020 · 0 comments

Comments

@ajdinaliu
Copy link

ajdinaliu commented Nov 16, 2020

https://github.com/aaronparker/FSLogix/blob/033e83561769593e77fd08aba027fa81853ef422/Modules/Fslogix.Powershell.Disk/Private/Get-DiskInformation.ps1#L16

Get-DiskImage returns an error "The process cannot access the file because it is being used by another process.", if a user is logged on with the container in $Path.

You should change this to:
Write-Error $Error[0] -ErrorAction Stop

Otherwise, functions like Get-FslDisk will fail, if a container is "in use"!

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

No branches or pull requests

1 participant