Skip to content

Commit

Permalink
fix: Load Update url from environment
Browse files Browse the repository at this point in the history
  • Loading branch information
svrooij committed May 1, 2024
1 parent 63b35f7 commit 496aafd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/WingetIntune.Cli/Commands/GenerateIndexCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ public GenerateIndexCommand() : base(name, description)
AddOption(new Option<string>(["--update-json"], "Create JSON file with only the updates") { IsHidden = true });
AddOption(new Option<string>(["--update-csv"], "Create CSV file with only the updates") { IsHidden = true });
AddOption(new Option<bool>(["--update-github"], "Create GitHub Action step summary") { IsHidden = true });
AddOption(new Option<Uri?>(["--update-uri"], "Post updates to this url") { IsHidden = true });
AddOption(new Option<Uri?>(["--update-uri"], () =>
{
var uri = Environment.GetEnvironmentVariable("UPDATE_URI");
return string.IsNullOrEmpty(uri) ? null : new Uri(uri);
}, "Post updates to this url")
{ IsHidden = true });

this.Handler = CommandHandler.Create<GenerateIndexCommandOptions, InvocationContext>(HandleCommand);
}
Expand Down

0 comments on commit 496aafd

Please sign in to comment.