[flutter_tools] Use XDG_CONFIG_HOME dir by default for config files#66645
Merged
jonahwilliams merged 1 commit intoflutter:masterfrom Oct 3, 2020
Merged
[flutter_tools] Use XDG_CONFIG_HOME dir by default for config files#66645jonahwilliams merged 1 commit intoflutter:masterfrom
jonahwilliams merged 1 commit intoflutter:masterfrom
Conversation
bd51f2d to
c230c50
Compare
jonahwilliams
suggested changes
Oct 1, 2020
packages/flutter_tools/test/commands.shard/hermetic/downgrade_test.dart
Outdated
Show resolved
Hide resolved
packages/flutter_tools/test/commands.shard/permeable/upgrade_test.dart
Outdated
Show resolved
Hide resolved
3151990 to
aecf881
Compare
Contributor
Author
|
Realized that the previous version would not work correctly on windows. Fixed, refactored and fixed requested changes. |
Contributor
|
Can you also resolve the conflicting files? |
aecf881 to
48b1257
Compare
48b1257 to
76a2c85
Compare
jonahwilliams
approved these changes
Oct 3, 2020
Contributor
jonahwilliams
left a comment
There was a problem hiding this comment.
LGTM!
Thank you for the contribution @Jesse-Bakker !
This was referenced Oct 20, 2020
Closed
pberginkonsult
added a commit
to pberginkonsult/meta-flutter
that referenced
this pull request
Jul 4, 2022
When building in a container environment without write access to users home directory the build fails when 'flutter pub' tries to install configuration into '$HOME/.config/flutter'. This can be avoided by setting the variable 'XDG_CONFIG_HOME' that 'flutter' is using to decide where to install [1]. [1] flutter/flutter#66645 Signed-off-by: Peter Bergin <peter@berginkonsult.se>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR changes the
Configclass influtter_toolsto use the XDG Base directory specification instead of putting files directly in the user's home directory. If those files are already present in the home directory, they are used instead.Related Issues
fixes #59430
Tests
I added the following tests:
config_test.dart:
Config in home dir,Config in config dirChecklist
Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.