Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Added a new `--ignore-unavailable` flag to the `install` command. When installin
* Fixed an issue where `winget search --id <msstoreId>` could fail to return a Microsoft Store package unless `--exact` was also provided.
* Updated NUnit to v4
* Fixed a crash (`0x8000ffff`) when using `--disable-interactivity` with the Resume experimental feature enabled during install operations.
* Location parameter is now passed in quotes for Nullsoft Installers by default
3 changes: 3 additions & 0 deletions src/AppInstallerCLITests/AppInstallerCLITests.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,9 @@
<CopyFileToFolders Include="TestData\InstallerArgTest_Inno_NoSwitches.yaml">
<DeploymentContent>true</DeploymentContent>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\InstallerArgTest_Nullsoft_NoSwitches.yaml">
<DeploymentContent>true</DeploymentContent>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\InstallerArgTest_Inno_WithSwitches.yaml">
<DeploymentContent>true</DeploymentContent>
</CopyFileToFolders>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,9 @@
<CopyFileToFolders Include="TestData\InstallerArgTest_Inno_NoSwitches.yaml">
<Filter>TestData</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\InstallerArgTest_Nullsoft_NoSwitches.yaml">
<Filter>TestData</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\UpdateFlowTest_Exe.yaml">
<Filter>TestData</Filter>
</CopyFileToFolders>
Expand Down
15 changes: 15 additions & 0 deletions src/AppInstallerCLITests/InstallFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,21 @@ TEST_CASE("ShellExecuteHandlerInstallerArgs", "[InstallFlow][workflow]")
REQUIRE(installerArgs.find("\t") == std::string::npos); // Whitespace only Custom switches should not be appended
}

{
std::ostringstream installOutput;
TestContext context{ installOutput, std::cin };
auto previousThreadGlobals = context.SetForCurrentThread();
// Nullsoft type with --location containing spaces; verify value is quoted in /D= switch
auto manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Nullsoft_NoSwitches.yaml"));
context.Args.AddArg(Execution::Args::Type::Silent);
context.Args.AddArg(Execution::Args::Type::InstallLocation, R"(C:\Program Files\CustomInstallDir)"sv);
context.Add<Data::Manifest>(manifest);
context.Add<Data::Installer>(manifest.Installers.at(0));
context << GetInstallerArgs;
std::string installerArgs = context.Get<Data::InstallerArgs>();
REQUIRE(installerArgs.find(R"(/D="C:\Program Files\CustomInstallDir")") != std::string::npos);
}

{
std::ostringstream installOutput;
TestContext context{ installOutput, std::cin };
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Id: AppInstallerCliTest.TestInstaller
Version: 1.0.0.0
Name: AppInstaller Test Installer
Publisher: Microsoft Corporation
AppMoniker: AICLITest
License: Test
Installers:
- Arch: x64
Url: https://ThisIsNotUsed
InstallerType: nullsoft
Sha256: 65DB2F2AC2686C7F2FD69D4A4C6683B888DC55BFA20A0E32CA9F838B51689A3B
ManifestVersion: 0.1.0
2 changes: 1 addition & 1 deletion src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ namespace AppInstaller::Manifest
{
{InstallerSwitchType::Silent, ManifestInstaller::string_t("/S")},
{InstallerSwitchType::SilentWithProgress, ManifestInstaller::string_t("/S")},
{InstallerSwitchType::InstallLocation, ManifestInstaller::string_t("/D=" + std::string(ARG_TOKEN_INSTALLPATH))}
{InstallerSwitchType::InstallLocation, ManifestInstaller::string_t("/D=\"" + std::string(ARG_TOKEN_INSTALLPATH) + "\"")}

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.

Just adding the note here for reviewers that MSI and Inno already had quotes around the paths. I'm not sure why Nullsoft didn't

};
case InstallerTypeEnum::Inno:
return
Expand Down
Loading