Comments (12)
@anangaur Any idea about this?
from extension-utilitiespack.
@pascalberger Yes this is a bug. I will try to fix it asap.
from extension-utilitiespack.
I tried setting an environment variable in powershell with empty value and it doesn't set that variable.
[Environment]::SetEnvironmentVariable("TestVariable", "", "User")
(This doesn't set the env variable)
I think an env variable with empty value means you are unsetting that environment variable and thus it is no longer passes the test-path env:$matchedItem check.
from extension-utilitiespack.
@harshil93 Yes this was also my observation. Any approach how this should be solved? Would setting an empty value in case neither environment variable was set nor value was found in configuration be an option?
from extension-utilitiespack.
@harshil93 @anangaur Any opinion about this?
from extension-utilitiespack.
I agree with @pascalberger. If an environment variable is unset (i.e. not found in configuration) by means of assigning it to an empty string, then the replaced variable should default to an empty string. i.e in the very last else
block of the tokenise.ps1 script:
Write-Host "No value found for token '$match' - setting to empty string"
$variableValue = [string]::Empty
works fine for me at the moment.
from extension-utilitiespack.
I've created a PR for this: #48. @harshil93 @anangaur Any chance to get this merged and released?
from extension-utilitiespack.
@pascalberger - One issue I can see with setting a not defined variable to an empty is breaking existing behavior if someone later in their tasks is doing something with unassigned variables.
Given this, I think an optional checkbox option telling user to replace undefined with empty ones would be better rather than just changing the behavior.
from extension-utilitiespack.
@harshil93 Thanks for the feedback. I'll update the PR with a user checkbox. But propably will wait until #50 is merged and rebase on this.
from extension-utilitiespack.
@pascalberger The PR is merged. If you want to contribute to this. Go ahead.
from extension-utilitiespack.
@harshil93 Since you have closed this issue do you already merge the PR (#48)? Otherwise the issue is not fixed...
from extension-utilitiespack.
@pascalberger I will try to get it merged by today. Reopening the issue till it get merged.
from extension-utilitiespack.
Related Issues (20)
- PowerShell++ inline script and Secret Variables HOT 1
- Powershell++ (Version : 0.4.0) task has not started
- Keeps saying configuration file not found HOT 1
- Shell ++ Failing with msg not found echo: null
- Tokenizer: Encoding detection function didn't play well in some encoding scenarios HOT 1
- Tokenizer Log shows parsing error but still task still completes successfully
- Tokenization notation documentation
- No error: Transformation not happening HOT 1
- Stream was not readable HOT 1
- Tokenization Poor Performance With Large Number of Token Instances
- Unzip to more than one server HOT 1
- Update documentation to mention how to specify which Environment to use for the Tokenizer task HOT 6
- Feature Request: Ability to provide/override Json environment used by Tokenizer task
- Feature Request: Allow Json file tokens to be replaced before transforming HOT 1
- Does source filename support wildcards? HOT 1
- Can you update the version in marketplace to latest?
- Feature Request: Allow PowerShell++ inline script to accept arguments HOT 2
- The icons of each task do not look coherent
- Access issues with UnZip task
- tokenize-ps3.ps1 does not work with environment variables HOT 3
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 extension-utilitiespack.