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

Add an $IsAzureFunctions #81

Open
TylerLeonhardt opened this issue Oct 25, 2018 · 7 comments
Open

Add an $IsAzureFunctions #81

TylerLeonhardt opened this issue Oct 25, 2018 · 7 comments
Labels
blocked enhancement New feature or request
Milestone

Comments

@TylerLeonhardt
Copy link
Member

Similar to $IsWindows, $IsMacOS, $IsLinux

Just a helper global variable that says whether a script is running in Azure Functions

cc/ @joeyaiello @SteveL-MSFT

@TylerLeonhardt TylerLeonhardt added the enhancement New feature or request label Oct 25, 2018
@JustinGrote
Copy link

JustinGrote commented Oct 25, 2018 via email

@TylerLeonhardt
Copy link
Member Author

Alternatively, if Azure Functions already exposes an Environment variable, we could possibly leave it at that.

@asavaritayal @pragnagopa and idea if this is a thing?

@dfinke
Copy link

dfinke commented Oct 25, 2018

Was thinking about how to get that the other day. I want to test my PS code locally but emit the results to $res if I'm running as an Azure Function.

@TylerLeonhardt
Copy link
Member Author

Good point @dfinke something like this could enable users to write scripts that would work locally and in Azure Functions.

@joeyaiello joeyaiello modified the milestones: Unknown, Backlog Nov 28, 2018
@joeyaiello
Copy link

Let's talk to the AzF team about adding an environment variable to the host that tells you you're in an Azure Function.

@TylerLeonhardt
Copy link
Member Author

Today they rely on:

WEBSITE_INSTANCE_ID

It would probably be nice to have a more customer friendly env var.

@anirudhgarg
Copy link
Member

There are a number of this including WEBSITE_INSTANCE_ID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants