Skip to content

Commit 7b8f3b4

Browse files
Merge pull request #605 from salesforcecli/phale/windows-nuts
fix: windows list NUTs
2 parents 7bd70fb + 08f4ea2 commit 7b8f3b4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/nut/listAndDisplay.nut.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,19 @@ describe('Org Command NUT', () => {
137137
);
138138
});
139139
it('should list orgs in a human readable form', () => {
140-
const lines = execCmd('org:list', { ensureExitCode: 0 }).shellOutput.stdout.split(os.EOL);
140+
const stdout = execCmd('org:list', { ensureExitCode: 0 }).shellOutput.stdout;
141+
let lines = stdout.split(os.EOL);
142+
if (lines.length === 1) {
143+
lines = stdout.split('\n');
144+
}
141145
verifyHumanResults(lines, defaultUsername, aliasedUsername);
142146
});
143147
it('should list additional information with --verbose', () => {
144-
const lines = execCmd('org:list --verbose', { ensureExitCode: 0 }).shellOutput.stdout.split(os.EOL);
148+
const stdout = execCmd('org:list --verbose', { ensureExitCode: 0 }).shellOutput.stdout;
149+
let lines = stdout.split(os.EOL);
150+
if (lines.length === 1) {
151+
lines = stdout.split('\n');
152+
}
145153
verifyHumanResults(lines, defaultUsername, aliasedUsername, true);
146154
});
147155
});

0 commit comments

Comments
 (0)