Exemplo n.º 1
0
        private async Task <ProcessEx> RestoreAsync(ITestOutputHelper output, string workingDirectory)
        {
            // It's not safe to run multiple NPM installs in parallel
            // https://github.com/npm/npm/issues/2500
            await NodeLock.WaitAsync();

            try
            {
                output.WriteLine($"Restoring NPM packages in '{workingDirectory}' using npm...");
                var result = await ProcessEx.RunViaShellAsync(output, workingDirectory, "npm install");

                return(result);
            }
            finally
            {
                NodeLock.Release();
            }
        }