Open CZEMacLeod opened 8 months ago
@CZEMacLeod, thanks for the feedback.
As a workaround, I think you can override the %TEMP%
environment variable just before running Sign CLI. The override only needs to be on the process, not user- or system-wide.
When running in a container, it might be the case that there is a mounted path which is faster than the overlay filesystem for handling throwaway files. When copying/overwriting an original file (or when the --output option is used that target folder), if the source and destination is on the same volume, it wouldn't have to do any actual data copying - especially if CoW were employed.
I think the existing
DirectoryService
could be augmented to take some options where the base temp directory would default toPath.GetTempPath()
if it wasn't set to something else. https://github.com/dotnet/sign/blob/f4efed9e8fb3296f29497b90feb6548e506f2078/src/Sign.Core/FileSystem/DirectoryService.cs#L25It might be possible just now to override the environment variables used when running the command to override where it thinks
Temp
is, but I feel it should be built into the CLI, rather than an external workaround.I would suggest -tmp or --temp-directory as the command line option name.
Version: 0.9.1-beta.23530.1+f4efed9e8fb3296f29497b90feb6548e506f2078