Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add functions into build.psm1 to Save and Restore PSOptions between different sessions.#6884

Merged
TravisEz13 merged 8 commits intoPowerShell:masterfrom
kalgiz:add-save-ps-options-function
May 18, 2018
Merged

Add functions into build.psm1 to Save and Restore PSOptions between different sessions.#6884
TravisEz13 merged 8 commits intoPowerShell:masterfrom
kalgiz:add-save-ps-options-function

Conversation

@kalgiz
Copy link
Contributor

@kalgiz kalgiz commented May 16, 2018

PR Summary

Add functions into build.psm1 to Save and Restore PSOptions between different sessions.

PR Checklist

build.psm1 Outdated
}
}

$psOptionsPath = 'psoptions.json'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we exclude the file from git?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will only use this during CI workflow currently. We can ignore it if it becomes a problem.

build.psm1 Outdated
$psOptionsPath = 'psoptions.json'

function Save-PSOptions {
$Script:Options = Get-PSOptions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to use the script scop in a variable used entirely inside a function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Member

@TravisEz13 TravisEz13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please address scope comment

@TravisEz13 TravisEz13 force-pushed the add-save-ps-options-function branch from f2e499b to 9809100 Compare May 18, 2018 00:59
@TravisEz13
Copy link
Member

I've triggered an official build off this branch to verify my changes don't break the official build.

@TravisEz13 TravisEz13 merged commit 4070d51 into PowerShell:master May 18, 2018
TravisEz13 pushed a commit to TravisEz13/PowerShell that referenced this pull request Aug 18, 2018
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

Successfully merging this pull request may close these issues.

3 participants