Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit 40b0e0f

Browse files
author
Peter Huene
committed
Make --no-build imply --no-restore for pack command.
This commit makes the `--no-build` option for the pack command automatically imply `--no-restore`. Fixes issue #7472.
1 parent de10b22 commit 40b0e0f

18 files changed

+57
-29
lines changed

src/dotnet/commands/dotnet-pack/LocalizableStrings.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
<value>Directory in which to place built packages.</value>
131131
</data>
132132
<data name="CmdNoBuildOptionDescription" xml:space="preserve">
133-
<value>Skip building the project prior to packing. By default, the project will be built.</value>
133+
<value>Do not build project before packing. Implies --no-restore.</value>
134134
</data>
135135
<data name="CmdIncludeSymbolsDescription" xml:space="preserve">
136136
<value>Include packages with symbols in addition to regular packages in output directory.</value>

src/dotnet/commands/dotnet-pack/PackCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static PackCommand FromArgs(string[] args, string msbuildPath = null)
4343

4444
msbuildArgs.AddRange(parsedPack.Arguments);
4545

46-
bool noRestore = parsedPack.HasOption("--no-restore");
46+
bool noRestore = parsedPack.HasOption("--no-restore") || parsedPack.HasOption("--no-build");
4747

4848
return new PackCommand(
4949
msbuildArgs,

src/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.cs.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
<note />
2424
</trans-unit>
2525
<trans-unit id="CmdNoBuildOptionDescription">
26-
<source>Skip building the project prior to packing. By default, the project will be built.</source>
27-
<target state="translated">Přeskočí sestavení projektu, dokud ho nezabalíte. Projekt se sestaví automaticky.</target>
26+
<source>Do not build project before packing. Implies --no-restore.</source>
27+
<target state="needs-review-translation">Přeskočí sestavení projektu, dokud ho nezabalíte. Projekt se sestaví automaticky.</target>
2828
<note />
2929
</trans-unit>
3030
<trans-unit id="CmdIncludeSymbolsDescription">

src/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.de.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
<note />
2424
</trans-unit>
2525
<trans-unit id="CmdNoBuildOptionDescription">
26-
<source>Skip building the project prior to packing. By default, the project will be built.</source>
27-
<target state="translated">Hiermit wird das Projekt nicht vor dem Packen erstellt. Standardmäßig wird das Projekt erstellt.</target>
26+
<source>Do not build project before packing. Implies --no-restore.</source>
27+
<target state="needs-review-translation">Hiermit wird das Projekt nicht vor dem Packen erstellt. Standardmäßig wird das Projekt erstellt.</target>
2828
<note />
2929
</trans-unit>
3030
<trans-unit id="CmdIncludeSymbolsDescription">

src/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.es.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
<note />
2424
</trans-unit>
2525
<trans-unit id="CmdNoBuildOptionDescription">
26-
<source>Skip building the project prior to packing. By default, the project will be built.</source>
27-
<target state="translated">Omita la compilación del proyecto antes de empaquetar. El proyecto se compilará de manera predeterminada.</target>
26+
<source>Do not build project before packing. Implies --no-restore.</source>
27+
<target state="needs-review-translation">Omita la compilación del proyecto antes de empaquetar. El proyecto se compilará de manera predeterminada.</target>
2828
<note />
2929
</trans-unit>
3030
<trans-unit id="CmdIncludeSymbolsDescription">

src/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.fr.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
<note />
2424
</trans-unit>
2525
<trans-unit id="CmdNoBuildOptionDescription">
26-
<source>Skip building the project prior to packing. By default, the project will be built.</source>
27-
<target state="translated">Ignorez la génération du projet avant la compression. Par défaut, le projet est généré.</target>
26+
<source>Do not build project before packing. Implies --no-restore.</source>
27+
<target state="needs-review-translation">Ignorez la génération du projet avant la compression. Par défaut, le projet est généré.</target>
2828
<note />
2929
</trans-unit>
3030
<trans-unit id="CmdIncludeSymbolsDescription">

src/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.it.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
<note />
2424
</trans-unit>
2525
<trans-unit id="CmdNoBuildOptionDescription">
26-
<source>Skip building the project prior to packing. By default, the project will be built.</source>
27-
<target state="translated">Consente di ignorare la compilazione del progetto prima di creare il pacchetto. Per impostazione predefinita, il progetto verrà compilato.</target>
26+
<source>Do not build project before packing. Implies --no-restore.</source>
27+
<target state="needs-review-translation">Consente di ignorare la compilazione del progetto prima di creare il pacchetto. Per impostazione predefinita, il progetto verrà compilato.</target>
2828
<note />
2929
</trans-unit>
3030
<trans-unit id="CmdIncludeSymbolsDescription">

src/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.ja.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
<note />
2424
</trans-unit>
2525
<trans-unit id="CmdNoBuildOptionDescription">
26-
<source>Skip building the project prior to packing. By default, the project will be built.</source>
27-
<target state="translated">パッキングの前に、プロジェクトの構築をスキップします。既定では、プロジェクトは構築されます。</target>
26+
<source>Do not build project before packing. Implies --no-restore.</source>
27+
<target state="needs-review-translation">パッキングの前に、プロジェクトの構築をスキップします。既定では、プロジェクトは構築されます。</target>
2828
<note />
2929
</trans-unit>
3030
<trans-unit id="CmdIncludeSymbolsDescription">

src/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.ko.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
<note />
2424
</trans-unit>
2525
<trans-unit id="CmdNoBuildOptionDescription">
26-
<source>Skip building the project prior to packing. By default, the project will be built.</source>
27-
<target state="translated">압축하기 전에 프로젝트를 빌드하지 않습니다. 기본적으로 프로젝트가 빌드됩니다.</target>
26+
<source>Do not build project before packing. Implies --no-restore.</source>
27+
<target state="needs-review-translation">압축하기 전에 프로젝트를 빌드하지 않습니다. 기본적으로 프로젝트가 빌드됩니다.</target>
2828
<note />
2929
</trans-unit>
3030
<trans-unit id="CmdIncludeSymbolsDescription">

src/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.pl.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
<note />
2424
</trans-unit>
2525
<trans-unit id="CmdNoBuildOptionDescription">
26-
<source>Skip building the project prior to packing. By default, the project will be built.</source>
27-
<target state="translated">Pomiń kompilację projektu przed pakowaniem. Domyślnie projekt zostanie skompilowany.</target>
26+
<source>Do not build project before packing. Implies --no-restore.</source>
27+
<target state="needs-review-translation">Pomiń kompilację projektu przed pakowaniem. Domyślnie projekt zostanie skompilowany.</target>
2828
<note />
2929
</trans-unit>
3030
<trans-unit id="CmdIncludeSymbolsDescription">

0 commit comments

Comments
 (0)