Skip to content
Merged
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
9 changes: 7 additions & 2 deletions src/WingetCreateCLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ internal class Program
private static async Task<int> Main(string[] args)
{
Logger.Initialize();
UserSettings.FirstRunTelemetryConsent();
TelemetryEventListener.EventListener.IsTelemetryEnabled();
SentenceBuilder.Factory = () => new LocalizableSentenceBuilder();
Console.OutputEncoding = System.Text.Encoding.UTF8;
Expand Down Expand Up @@ -57,14 +56,20 @@ private static async Task<int> Main(string[] args)
var parserResult = myParser.ParseArguments(args, types);

BaseCommand command = parserResult.MapResult(c => c as BaseCommand, err => null);

if (command == null)
{
DisplayHelp(parserResult as NotParsed<object>);
DisplayParsingErrors(parserResult as NotParsed<object>);
return args.Any() ? 1 : 0;
}

if (command is not DscCommand)
{
// For DSC commands, we do not want to display the header to
// ensure the output is a valid JSON.
UserSettings.FirstRunTelemetryConsent();
}

// If the user has provided a token via the command line, warn them that it may be logged
if (!string.IsNullOrEmpty(command.GitHubToken))
{
Expand Down
8 changes: 0 additions & 8 deletions src/WingetCreateCLI/WingetCreateCLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,6 @@
<ItemGroup>
<Folder Include="Models\" />
</ItemGroup>

<ItemGroup>
  <Content Include="$(ProjectDir)\DscResources\microsoft.winget-create.*.dsc.resource.json">
<Link>%(Filename)%(Extension)</Link>
    <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    <CopyToPublishDirectory>Always</CopyToPublishDirectory>
  </Content>
</ItemGroup>

<!--Generate settings manifest-->
<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Inputs="@(SettingSchema)" Outputs="@(SettingSchema -> '$(ProjectDir)Models\%(ModelName)Model.cs')">
Expand Down
1 change: 1 addition & 0 deletions src/WingetCreatePackage/WingetCreatePackage.wapproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="..\WingetCreateCli\DscResources\*.dsc.resource.json" />
<Content Include="Images\LockScreenLogo.scale-200.png" />
<Content Include="Images\SplashScreen.scale-200.png" />
<Content Include="Images\Square150x150Logo.scale-200.png" />
Expand Down