-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Description
On the current develop branch, -c or --config doesn't work at all.
Reproduction Steps
Signingserver.client.exe --config config1.json somefiletobesigned.dll
Output:
2025-03-11 10:40:19.3211 Debug - Hosting starting
2025-03-11 10:40:19.3315 Info - Application started. Press Ctrl+C to shut down.
2025-03-11 10:40:19.3315 Info - Hosting environment: Production
2025-03-11 10:40:19.3315 Info - Content root path: C:\projects\xyz
2025-03-11 10:40:19.3315 Debug - Hosting started
2025-03-11 10:40:19.3315 Trace - Loading config.json
2025-03-11 10:40:19.3693 Trace - Configuration loaded from config.json
2025-03-11 10:40:19.3747 Error - Unknown option '--config'
2025-03-11 10:40:19.3747 Debug - Hosting stopping
2025-03-11 10:40:19.3747 Info - Application is shutting down...
2025-03-11 10:40:19.3747 Debug - Hosting stopped
The error apparently comes from SigningClientConfigurationBase.HandleArg which doesn't recognize this argument. This is technically fine, as it is used earlier in the process, but it should just be ignored here.
Additionally, DefaultSigningConfigurationLoader<TConfiguration>.LoadConfigurationFromFileAsync() always reads the default config.json from the dll BaseDirectory, and if it exists the other file is ignored. Since the default config.json is part of the nuget package, it is always there, which makes it impossible to be overwritten.
Expected behavior
(Only) the specified config file is loaded, and no error is printed.
Actual Behavior
See above
Known Workarounds
Include the correct config.json in one's own package.
Other information
No response