Comments (7)
There doesn't seem to be a clear pattern for getting the temp folder location in different platforms: PowerShell/PowerShell#4216
So it might just be simplest to add a Get-TempPath
utility function that just returns:
- Windows: $env:TEMP
- macOS: $env:TMPDIR
- Linux: /tmp
from psdeploy.
@RamblingCookieMonster - are you happy for me to submit a PR to fix this by adding a new Get-TempFolder
utility function in the /Private/PSYaml/Private/
folder?
from psdeploy.
Eek, sorry, forgot about this!
Sure! I could see that function being useful for other bits.
If it's easier, you could also do something like
- Remove the default value from the line you pasted
- Add a simple
if (-not
$ShadowPath`) bit that sets the default if not specified, and only in the Windows section of that logic
Either works for me!
from psdeploy.
Cool! In progress now - thanks @RamblingCookieMonster !
from psdeploy.
@RamblingCookieMonster - I've been looking at this one closely and there is one thing I find strange: The 'Windows only' code (the New-Item
line) seems to fire under Linux and macOS on TravisCI
and Azure Pipelines
? It looks like it shouldn't execute in those environments.
It seems that this test evaluates to true
:
if(!(Test-Path -Path Variable:\IsWindows) -or $IsWindows) {
}
I've done a bunch of tests on my local Ubuntu server and on the TravisCI to confirm the result of the above test:
https://travis-ci.org/PlagueHO/CosmosDB/jobs/431726377#L2803
What it shows is that the above test should not
have evaluated to True on TravisCI so this code shouldn't have executed but for some reason it does (https://travis-ci.org/PlagueHO/CosmosDB/jobs/431726377#L2808)?
Completely stumped as to why this code executes...
Any idea why?
from psdeploy.
Weird!! I... might just poke around and see if powershell-yaml is compatible, for some reason didn't use it at the start - works cross platform, haven't had any issues in other modules
from psdeploy.
It is really odd indeed. It doesn't actually stop the module from working BTW - at least not for me. It just logs the exception.
from psdeploy.
Related Issues (20)
- DependingOn not working as expected (ordering wrong) HOT 5
- AppVeyor deployment not supporting subfolder for nupkg HOT 1
- Deployment fails on Linux HOT 3
- Move FileSystem tests out of the main function tests.
- Appveyor module fails when running in Powershell 6.0 HOT 1
- AppVeyor deployment: NuGet: An error occurred while parsing EntityName errors
- [Suggestion] Using name instead of path parameter in PSGalleryModule deployment type
- Invoke-Robocopy FatalError with /xf parameter
- Search for *psdeploy.ps1 is case sensitive on Unix systems
- GitHub Release DeploymentType HOT 2
- Please upgrade to latest YamlDotNet
- New Deployment Type: Azure Automation runbook HOT 2
- My psd1 version and psgallery version don't update.
- RequiredModules breaks PSGallery deploy type to private nuget repo HOT 1
- By Filesystem on PS Core fails with error HOT 1
- Upcoming major releases of Chocolatey products that may impact functionality on the integration HOT 1
- New Deployment Type: SCP HOT 2
- Filter deploy based on Tag/TagName and pre-release status HOT 7
- PSGalleryModule - Make ApiKey optional HOT 4
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 psdeploy.