From 2be91563853b96f32d88a2522c1eaa62f59f10e2 Mon Sep 17 00:00:00 2001 From: Wonyoung Choi Date: Thu, 30 Jul 2020 14:12:04 +0900 Subject: [PATCH] Fix dotnet-wrapper to disable nodeReuse Change-Id: I734c7ff46a6f4027599e49792f1283752fcf5921 --- tools/dotnet-wrapper.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/dotnet-wrapper.sh b/tools/dotnet-wrapper.sh index 0b732382..0ef3f903 100755 --- a/tools/dotnet-wrapper.sh +++ b/tools/dotnet-wrapper.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e DOTNET_CLI_PATH=/usr/share/dotnet-build-tools/sdk/dotnet @@ -7,9 +7,8 @@ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true export DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2 export MSBUILDDISABLENODEREUSE=true -if [ "$1" == "msbuild" ]; then - ARGS="$@ /nodeReuse:false /p:UseSharedCompilation=false" -elif [ "$1" == "restore" ]; then +CMD=$1 +if [ "$CMD" == "restore" ]; then while [[ $# -gt 0 ]]; do x="$1" if [ $x == "-s" ] || [ $x == "--source" ]; then @@ -22,11 +21,13 @@ elif [ "$1" == "restore" ]; then fi shift done -elif [ "$1" == "build" ]; then - ARGS="$@ /p:UseSharedCompilation=false" else ARGS="$@" fi +if [ "$CMD" == "msbuild" -o "$CMD" == "build" -o "$CMD" == "restore" ] ; then + ARGS+=" /nodeReuse:false /p:UseSharedCompilation=false" +fi + echo $DOTNET_CLI_PATH $ARGS $DOTNET_CLI_PATH $ARGS -- 2.34.1