Skip to content

XDG Changes - #1060

Merged
James Truher (JamesWTruher) merged 17 commits into
masterfrom
xdg
Jun 9, 2016
Merged

James Truher (JamesWTruher) merged 17 commits into
masterfrom
xdg

Conversation

@ealexjordan

@ealexjordan A (ealexjordan) commented May 31, 2016 •

Copy link
Copy Markdown
Contributor

Enable options for using environment variable for XDG paths.


This change is Reviewable

@andyleejordan

Andy Jordan (andyleejordan) commented May 31, 2016 •

Copy link
Copy Markdown
Member

Would you rebase onto master and drop the VS Code commit? Thanks.

}

HistorySavePath = System.IO.Path.Combine(
Environment.GetEnvironmentVariable("HOME"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There will be an dup path issue if we directly append modulepath with "home" again since you have already got the absolute path of modulepath. You should be able to directly use it. Please make sure add a test case for HistorySavePath.

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.

Can you remove this commented out code?

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.

These changes cannot be tested automatically, but I've manually verified it worked.

@andyleejordan

Copy link
Copy Markdown
Member

LGTM :shipit:

v-alexjo and others added 16 commits June 9, 2016 09:50
Conflicts:
	src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs
This renames the tests and updates for better requirement
specifications. The profile, modules, history, and startup cache data
are tested for not breaking Windows behavior, new Linux behavior, and
respecting set variables on launch. This also corrects some erroneous
assumptions I had previously made.

The ModuleAnalysisCache cannot be tested, and the startup cache data
might not be testable on Windows.
Bug introduced in initial port of PSReadLine. `Path.Combine` sees the
initial backslash as an absolute path, thus discarding `AppData`.
These should be marked as `-Pending` but Pester doesn't accept both
`-Skip` and `-Pending` parameters, so they had to be combined to support
skipping on Windows.
Use `USERPROFILE`, not `HOME`. The latter doesn't exist on Windows, and
`HOMEPATH` strips the drive. The former provides `C:\Users\<username>`.

Fix location tested for JIT cache location on Windows.
@andyleejordan

Copy link
Copy Markdown
Member

James Truher (@JamesWTruher) tests refactored, do you sign off?

I say :shipit:.

@JamesWTruher
James Truher (JamesWTruher) merged commit eeb715b into master Jun 9, 2016
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
XDG Changes
I like these tests much better now - far easier to follow
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.

6 participants