Comments (7)
PS> Get-Command Get-AppxPackage
CommandType Name Version Source
----------- ---- ------- ------
Function Get-AppxPackage 1.0 Appx
Given that Get-AppxPackage comes from a module in 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Appx' then it seems reasonable that it has expectations of a windows environment. As far as I can tell it is not part of the PowerShell Core project.
since in my shell scripts I sanitise (that is clear) most env vars
Fortunately, you have already identified the root cause.
If you want to have a clean environment without any environment variables that Windows programs depend on, then don't run any Windows programs that depend on those environment variables.
from powershell.
Maybe that's also something more general. In particular I've just noticed that the same happens with python
.
from powershell.
If you want to have a clean environment without any environment variables that Windows programs depend on, then don't run any Windows programs that depend on those environment variables.
Well, still it's probably not good behaviour if the programs behave odd without any error, when crucial stuff is missing.
from powershell.
Well, still it's probably not good behaviour if the programs behave odd without any error, when crucial stuff is missing.
You are absolutely right, I would not recommend removing standard windows environment variables that windows apps have a reasonable expectation of being correctly set in order to operate.
from powershell.
PowerShell itself doesn't have a dependency on $env:SYSTEMDRIVE
when using cmdlets in general so this seems to be something internal to the AppX module. That modules is part of Windows and not serviced as part of PowerShell so you'll need to report this via the Windows Feedback tool
from powershell.
This issue has been marked as external and has not had any activity for 1 day. It has been be closed for housekeeping purposes.
from powershell.
📣 Hey @philcerf, how did we do? We would love to hear your feedback with the link below! 🗣️
🔗 https://aka.ms/PSRepoFeedback
from powershell.
Related Issues (20)
- CreateOutOfProcessRunspace fails to Open HOT 1
- `exit` does not return ExitCode when using #Requires -Module <ScriptModule> HOT 1
- pwsh Exception not serializable anymore HOT 5
- `Using Script` directive HOT 8
- Write-Information outputting twice with jobs and is it really Write-Host in disguise. HOT 1
- Unable to attach Visual Studio debugger to pwsh.exe process HOT 7
- `+=` copies array many times HOT 16
- Expand -OutputFormat to include JSON output HOT 12
- Out-GridView filtering doesn't allow entering strings with embedded spaces HOT 1
- Add Delimiter or NewLine argument to Set-Content HOT 13
- Get-Content - Inconsistent handling of Delimiters HOT 7
- Better User Interface for Powershell ISE HOT 3
- UNexpected random message HOT 7
- `install-powershell.ps1 -UseMSI` fails for arm64 HOT 1
- Add support for Normalization Form to Normalize HOT 3
- The class construct error HOT 7
- install-powershell.sh doesn't work on azure-linux HOT 5
- Invoke-WebRequest with Request gives "Object reference not set to an instance of an object" if there was an HTTP redirect HOT 7
- Enter-PSSession doesn't work inside a function called from -Command argument HOT 3
- Empty `ErrorRecord`-wrapped stderr lines stringify as the exception type name rather than as the empty string
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powershell.