Skip to content

Commit 63309c6

Browse files
author
JulesFaucherre
authored
Merge pull request #900 from CircleCI-Public/develop
Release
2 parents ed408fb + 25740ce commit 63309c6

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/i
5959
You can also set a specific version of the CLI to install with the `VERSION` environment variable:
6060

6161
```
62-
curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/install.sh | VERSION=0.1.5222 sudo bash
62+
curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/install.sh | sudo VERSION=0.1.5222 bash
6363
```
6464

65+
Take note that additional environment variables should be passed between sudo and invoking bash.
66+
6567
#### Checksum verification
6668

6769
If you would like to verify the checksum yourself, you can download the checksum file from the [GitHub releases page](https://github.com/CircleCI-Public/circleci-cli/releases) and verify the checksum of the archive using the `circleci-cli_<version>_checksums.txt` inside the assets of the release you'd like to install:

config/commands.go

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,27 @@ package config
33
import (
44
"fmt"
55
"os"
6+
"sort"
67
"strings"
78

89
"github.com/pkg/errors"
910
"gopkg.in/yaml.v3"
1011
)
1112

1213
func printValues(values Values) {
13-
for key, value := range values {
14-
fmt.Fprintf(os.Stderr, "%-18s %s\n", key+":", value)
14+
// Provide a stable sort order for printed values
15+
keys := make([]string, 0, len(values))
16+
for k := range values {
17+
keys = append(keys, k)
1518
}
19+
sort.Strings(keys)
20+
21+
for _, key := range keys {
22+
fmt.Fprintf(os.Stderr, "%-18s %v\n", key+":", values[key])
23+
}
24+
25+
// Add empty newline at end
26+
fmt.Fprintf(os.Stderr, "\n")
1627
}
1728

1829
type ProcessConfigOpts struct {
@@ -73,7 +84,7 @@ func (c *ConfigCompiler) ProcessConfig(opts ProcessConfigOpts) error {
7384
//if no orgId provided use org slug
7485
values := LocalPipelineValues()
7586
if opts.VerboseOutput {
76-
fmt.Println("Processing config with following values")
87+
fmt.Fprintln(os.Stderr, "Processing config with following values:")
7788
printValues(values)
7889
}
7990

@@ -118,7 +129,7 @@ func (c *ConfigCompiler) ValidateConfig(opts ValidateConfigOpts) error {
118129
//if no orgId provided use org slug
119130
values := LocalPipelineValues()
120131
if opts.VerboseOutput {
121-
fmt.Println("Validating config with following values")
132+
fmt.Fprintln(os.Stderr, "Validating config with following values:")
122133
printValues(values)
123134
}
124135

@@ -152,6 +163,6 @@ func (c *ConfigCompiler) ValidateConfig(opts ValidateConfigOpts) error {
152163
}
153164
}
154165

155-
fmt.Printf("\nConfig file at %s is valid.\n", opts.ConfigPath)
166+
fmt.Printf("Config file at %s is valid.\n", opts.ConfigPath)
156167
return nil
157168
}

0 commit comments

Comments
 (0)