Skip to content

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

Merged
Travis Plunk (TravisEz13) merged 8 commits into
PowerShell:masterfrom
kalgiz:add-save-ps-options-function
May 18, 2018
Merged

Travis Plunk (TravisEz13) merged 8 commits into
PowerShell:masterfrom
kalgiz:add-save-ps-options-function

Conversation

@kalgiz

@kalgiz Klaudia Algiz (kalgiz) commented May 16, 2018 •

Copy link
Copy Markdown
Contributor

PR Summary

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

PR Checklist

Comment thread build.psm1 Outdated
}
}

$psOptionsPath = 'psoptions.json'

Copy link
Copy Markdown
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
Copy Markdown
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.

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

function Save-PSOptions {
$Script:Options = Get-PSOptions

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@TravisEz13 Travis Plunk (TravisEz13) left a comment

Copy link
Copy Markdown
Member

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
Travis Plunk (TravisEz13) force-pushed the add-save-ps-options-function branch from f2e499b to 9809100 Compare May 18, 2018 00:59
@TravisEz13

Copy link
Copy Markdown
Member

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

@TravisEz13
Travis Plunk (TravisEz13) merged commit 4070d51 into PowerShell:master May 18, 2018
Travis Plunk (TravisEz13) pushed a commit to TravisEz13/PowerShell that referenced this pull request Aug 18, 2018
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
…ifferent sessions. (PowerShell#6884)

Add functions into build.psm1 to Save and Restore PSOptions between different sessions.
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