Skip to content

Commit 19355ee

Browse files
committed
fix(bootstrapper): keep the deprecation notices out of silent output
In transparent magic mode the bootstrapper is the paket.exe that Paket.Restore.targets invokes with '-s' and whose stdout it parses as MSBuild conditions; WriteAlways bypassed that '-s'.
1 parent 2e7ad92 commit 19355ee

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎RELEASE_NOTES.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#### 11.0.0-alpha001 - 2026-09-12
2-
* DEPRECATION: `paket.exe` and `paket.bootstrapper.exe` are deprecated and will no longer be published from Paket 12.0 onwards. The `paket` .NET tool becomes the only supported way to run Paket: `dotnet tool install paket`. Both binaries now print a notice on every run.
2+
* DEPRECATION: `paket.exe` and `paket.bootstrapper.exe` are deprecated and will no longer be published from Paket 12.0 onwards. The `paket` .NET tool becomes the only supported way to run Paket: `dotnet tool install paket`. Both binaries now print a notice on every run unless `-s` is passed.
33
* The bootstrapper shipped with this release never resolves a version past 11.x, so it keeps working once 12.0 ships without a `paket.exe` asset instead of failing the build. An explicitly pinned version is unaffected.
44
* Upgrade to .NET 10: SDK 10.0.400 and target frameworks from net9 to net10.0. The `paket` .NET tool now requires the .NET 10 runtime; the merged `paket.exe` still targets net461.
55
* Allow a whole `source` line in paket.dependencies to come from an environment variable (`source %FEED_URL%`) - https://github.com/fsprojects/Paket/pull/4374

‎src/Paket.Bootstrapper/BootstrapperHelper.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Paket.Bootstrapper
1111
internal static class BootstrapperHelper
1212
{
1313
/// <summary>
14-
/// Printed on every run, whatever the verbosity. Paket 12.0 and later ship the .NET tool
14+
/// Printed on every run that isn't silent. Paket 12.0 and later ship the .NET tool
1515
/// only, and their releases carry no paket.exe asset for the bootstrapper to download.
1616
/// </summary>
1717
public const string DeprecationNotice =

‎src/Paket.Bootstrapper/DownloadStrategies/DownloadStrategy.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ internal static string CapToLastSupportedVersion(string version)
5252
if (parsed.Major <= LastSupportedMajorVersion)
5353
return version;
5454

55-
ConsoleImpl.WriteAlways(
55+
ConsoleImpl.WriteWarning(
5656
"Paket {0} is available, but it is published as a .NET tool only and cannot be downloaded by the bootstrapper. Staying on {1}. To move on, run: dotnet tool install paket",
5757
version, LastSupportedVersion);
5858

‎src/Paket.Bootstrapper/Program.cs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ static void Main(string[] args)
6161

6262
ConsoleImpl.Verbosity = options.Verbosity;
6363

64-
// WriteAlways, not WriteWarning: the latter is dropped by the verbosity filter as soon
65-
// as '-s' is passed, and transparent magic mode adds a '-s' of its own, which is exactly
66-
// the population that has to see this.
67-
ConsoleImpl.WriteAlways(BootstrapperHelper.DeprecationNotice);
64+
// WriteWarning, not WriteAlways: it goes to stdout, and under '-s' (which transparent
65+
// magic mode adds on its own) that stream is parsed by Paket.Restore.targets
66+
// ('show-conditions -s'), where any extra line breaks the build.
67+
ConsoleImpl.WriteWarning(BootstrapperHelper.DeprecationNotice);
6868

6969
if (options.UnprocessedCommandArgs.Any())
7070
ConsoleImpl.WriteWarning("Ignoring the following unknown argument(s): {0}", String.Join(", ", options.UnprocessedCommandArgs));

0 commit comments

Comments
 (0)