-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add tar archive installer type
#6278
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,6 +60,7 @@ | |
| "appx", | ||
| "exe", | ||
| "zip", | ||
| "tar", | ||
| "inno", | ||
| "nullsoft", | ||
| "wix", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| #pragma once | ||
| #include <AppInstallerStrings.h> | ||
| #include <AppInstallerVersions.h> | ||
| #include <algorithm> | ||
| #include <functional> | ||
| #include <map> | ||
| #include <set> | ||
|
|
@@ -109,6 +110,7 @@ | |
| Msi, | ||
| Nullsoft, | ||
| Zip, | ||
| Tar, | ||
| Msix, | ||
| Exe, | ||
| Burn, | ||
|
|
@@ -117,6 +119,16 @@ | |
| Font, | ||
| }; | ||
|
|
||
| inline bool IsTarInstallerTypeAlias(std::string_view s) | ||
| { | ||
| using namespace std::string_view_literals; | ||
| static constexpr std::string_view aliases[] = { | ||
| "tar"sv, "tgz"sv, "tbz2"sv, "tbz"sv, "txz"sv, "tzst"sv, | ||
|
Check failure on line 126 in src/AppInstallerCommonCore/Public/winget/ManifestCommon.h
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not a big fan of a huge number of aliases here; I would rather just have the one name for it. So I guess what I'm saying is, I just want |
||
| "tar.gz"sv, "tar.bz2"sv, "tar.xz"sv, "tar.zst"sv, "tar.lz4"sv, | ||
| }; | ||
| return std::find(std::begin(aliases), std::end(aliases), s) != std::end(aliases); | ||
| } | ||
|
|
||
| enum class UpdateBehaviorEnum | ||
| { | ||
| Unknown, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might need to figure out the answer to this gap before we could accept it. I doubt tar is immune to the same kinds malicious use as zip.