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 cache command for managing downloaded installers #119

Merged
merged 7 commits into from
Jul 22, 2021
Merged

Conversation

ryfu-msft
Copy link
Contributor

@ryfu-msft ryfu-msft commented Jul 21, 2021

This pull request resolves #62

Changes:

  • Change installer download path from %temp% -> %temp%/wingetcreate
  • Created a cache command that opens the cache folder, lists downloaded installers, and cleans out all downloaded installers
  • Changed basecommand.githubtoken to be a virtual property that can be overrided so that commands like settings and cache don't inherit the --token option
  • Removes GetVerbs() from program.cs as this was displaying commands in alphabetical order. Reverted to listing out the commands in an array to have an ordering based on usage.
  • Added cache command documentation

Testing:

  • Added unit tests for the cache command
Microsoft Reviewers: Open in CodeFlow

@ryfu-msft ryfu-msft requested a review from palenshus July 21, 2021 23:23
@ryfu-msft ryfu-msft requested a review from a team as a code owner July 21, 2021 23:23
@ghost ghost added Issue-Bug Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Jul 21, 2021
Copy link
Contributor

@palenshus palenshus left a comment

Choose a reason for hiding this comment

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

🕐

@ghost ghost removed the Needs-Author-Feedback label Jul 22, 2021
@ryfu-msft ryfu-msft requested a review from palenshus July 22, 2021 18:09
@palenshus
Copy link
Contributor

palenshus commented Jul 22, 2021

Hit an unrelated error where if the AppStatePath wasn't already created at first run, the program would crash. Recommend creating it just to be sure:

    private static readonly Lazy<string> AppStatePathLazy = new(() =>
    {
        string path = IsRunningAsUwp()
            ? ApplicationData.Current.LocalFolder.Path
            : Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Microsoft", ModuleName);
        Directory.CreateDirectory(path);
        return path;
    });

In reply to: 885148402


In reply to: 885148402


In reply to: 885148402


In reply to: 885148402 #Closed

@ryfu-msft
Copy link
Contributor Author

Changed to suggestion


In reply to: 885148402

@ryfu-msft ryfu-msft requested a review from palenshus July 22, 2021 20:58
Copy link
Contributor

@palenshus palenshus left a comment

Choose a reason for hiding this comment

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

:shipit:

@ryfu-msft ryfu-msft merged commit 26739b3 into main Jul 22, 2021
@ryfu-msft ryfu-msft deleted the cacheInstallers branch July 22, 2021 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wingetcreate storing installers in %temp% folder
2 participants