diff --git a/build/_dnu.shade b/build/_dnu.shade index 1c00ced8e6..57cad3fdf9 100644 --- a/build/_dnu.shade +++ b/build/_dnu.shade @@ -1,19 +1,23 @@ @{/* dnu - Run dnu commands in your project. Executes dnu command. + Run dnu commands in your project. Executes `dnu` command. command='' The `dnu` subcommand to execute. dnvmUse='' - Optional. The DNX framework to use. Suitable for a `dnvm exec` command. + Optional. The DNX framework to use. Suitable for a `dnvm exec` or `dnvm use` command. */} default dnvmUse='' var dnvmPath = '${ Path.Combine(Directory.GetCurrentDirectory(), "packages", "KoreBuild", "build", "dnvm") }' exec program='cmd' commandline='/C dnu ${command}' if='!IsLinux && string.IsNullOrEmpty(dnvmUse)' -exec program='cmd' commandline='/C "${dnvmPath}" exec ${dnvmUse} dnu ${command}' if='!IsLinux && !string.IsNullOrEmpty(dnvmUse)' + +var cmdCommand = '/S /C ""${dnvmPath}.cmd" use ${dnvmUse} && dnu ${command}"' +exec program='cmd' commandline='${ cmdCommand }' if='!IsLinux && !string.IsNullOrEmpty(dnvmUse)' + exec program='dnu' commandline='${command}' if='IsLinux && string.IsNullOrEmpty(dnvmUse)' -var commandLine = 'bash -c ". \"${dnvmPath}.sh\"; dnvm exec ${dnvmUse} dnu ${command}"' -exec program='/usr/bin/env' commandline='${ commandLine }' if='IsLinux && !string.IsNullOrEmpty(dnvmUse)' + +var envCommand = 'bash -c "source \"${dnvmPath}.sh\" && dnvm use ${dnvmUse} && dnu ${command}"' +exec program='/usr/bin/env' commandline='${ envCommand }' if='IsLinux && !string.IsNullOrEmpty(dnvmUse)' diff --git a/build/_k.shade b/build/_k.shade index 06cc89b70b..f95d5f81c4 100644 --- a/build/_k.shade +++ b/build/_k.shade @@ -8,7 +8,7 @@ command='' dnxDir='' Optional. The directory in which to execute the `dnx` command. dnvmUse='' - Optional. The DNX framework to use. Suitable for a `dnvm run` command. + Optional. The DNX framework to use. Suitable for a `dnvm run` or `dnvm use` command. */} default currentDir = '${Directory.GetCurrentDirectory()}' @@ -18,7 +18,11 @@ default dnvmUse='' var dnvmPath = '${ Path.Combine(Directory.GetCurrentDirectory(), "packages", "KoreBuild", "build", "dnvm") }' exec program='cmd' commandline='/C dnx ${command}' workingdir='${dnxDir}' if='!IsLinux && string.IsNullOrEmpty(dnvmUse)' -exec program='cmd' commandline='/C "${dnvmPath}" run ${dnvmUse} ${command}' workingdir='${dnxDir}' if='!IsLinux && !string.IsNullOrEmpty(dnvmUse)' + +var cmdCommand = '/S /C ""${dnvmPath}.cmd" use ${dnvmUse} && dnx ${command}"' +exec program='cmd' commandline='${ cmdCommand }' workingdir='${dnxDir}' if='!IsLinux && !string.IsNullOrEmpty(dnvmUse)' + exec program='dnx' commandline='${command}' workingdir='${dnxDir}' if='IsLinux && string.IsNullOrEmpty(dnvmUse)' -var commandLine = 'bash -c ". \"${dnvmPath}.sh\"; dnvm run ${dnvmUse} ${command}"' -exec program='/usr/bin/env' commandline='${ commandLine }' workingdir='${dnxDir}' if='IsLinux && !string.IsNullOrEmpty(dnvmUse)' + +var envCommand = 'bash -c "source \"${dnvmPath}.sh\" && dnvm use ${dnvmUse} && dnx ${command}"' +exec program='/usr/bin/env' commandline='${ envCommand }' workingdir='${dnxDir}' if='IsLinux && !string.IsNullOrEmpty(dnvmUse)'