Whitespace and grammer

This commit is contained in:
Ian Wahbe 2021-08-30 18:56:02 -07:00
parent 8150ef0880
commit 43114007eb
3 changed files with 6 additions and 9 deletions

View file

@ -1,6 +1,5 @@
// Copyright 2016-2021, Pulumi Corporation. // Copyright 2016-2021, Pulumi Corporation.
// //
//
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
// You may obtain a copy of the License at // You may obtain a copy of the License at
@ -57,7 +56,7 @@ const (
func newAboutCmd() *cobra.Command { func newAboutCmd() *cobra.Command {
var jsonOut bool var jsonOut bool
var transitiveDependencies bool var transitive Dependencies bool
short := "Print information about the Pulumi environment." short := "Print information about the Pulumi environment."
cmd := cmd :=
&cobra.Command{ &cobra.Command{
@ -514,9 +513,9 @@ func callPythonCommandNoEnviroment(args ...string) (string, error) {
} }
func getPythonProgramDependencies(proj *workspace.Project, rootDir string, func getPythonProgramDependencies(proj *workspace.Project, rootDir string,
transative bool) ([]programDependencieAbout, error) { transitive bool) ([]programDependencieAbout, error) {
cmdArgs := []string{"-m", "pip", "list", "--format=json"} cmdArgs := []string{"-m", "pip", "list", "--format=json"}
if !transative { if !transitive {
cmdArgs = append(cmdArgs, "--not-required") cmdArgs = append(cmdArgs, "--not-required")
} }
@ -533,7 +532,7 @@ func getPythonProgramDependencies(proj *workspace.Project, rootDir string,
return result, nil return result, nil
} }
func getDotNetProgramDependencies(proj *workspace.Project, transative bool) ([]programDependencieAbout, error) { func getDotNetProgramDependencies(proj *workspace.Project, transitive bool) ([]programDependencieAbout, error) {
// dotnet list package // dotnet list package
var err error var err error
@ -550,7 +549,7 @@ func getDotNetProgramDependencies(proj *workspace.Project, transative bool) ([]p
return nil, err return nil, err
} }
cmdArgs := []string{"list", "package"} cmdArgs := []string{"list", "package"}
if transative { if transitive {
cmdArgs = append(cmdArgs, "--include-transitive") cmdArgs = append(cmdArgs, "--include-transitive")
} }
cmd := exec.Command(ex, cmdArgs...) cmd := exec.Command(ex, cmdArgs...)
@ -593,7 +592,7 @@ func getDotNetProgramDependencies(proj *workspace.Project, transative bool) ([]p
func getNodeProgramDependencies(rootDir string, transitive bool) ([]programDependencieAbout, error) { func getNodeProgramDependencies(rootDir string, transitive bool) ([]programDependencieAbout, error) {
// Neither "yarn list" or "npm ls" can describe what packages are required // Neither "yarn list" or "npm ls" can describe what packages are required
// (direct dependencies). Only what packages they have installed (transitive // (direct dependencies). Only what packages they have installed (transitive
// dependencies). This means that to accuratly report only direct // dependencies). This means that to accurately report only direct
// dependencies, we need to also parse "package.json" and intersect it with // dependencies, we need to also parse "package.json" and intersect it with
// reported dependencies. // reported dependencies.
var err error var err error

View file

@ -1,6 +1,5 @@
// Copyright 2016-2021, Pulumi Corporation. // Copyright 2016-2021, Pulumi Corporation.
// //
//
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
// You may obtain a copy of the License at // You may obtain a copy of the License at

View file

@ -1,6 +1,5 @@
// Copyright 2016-2021, Pulumi Corporation. // Copyright 2016-2021, Pulumi Corporation.
// //
//
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
// You may obtain a copy of the License at // You may obtain a copy of the License at