Skip to content

Commit 2bd68fd

Browse files
authored
Shebang issue fixed [FABCN-438] (#271)
Signed-off-by: Kestutis Gudynas <44440041+kemi04@users.noreply.github.com>
1 parent 1d43015 commit 2bd68fd

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

libraries/fabric-shim/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const Logger = require('./lib/logger');
55
const logger = Logger.getLogger('fabric-shim/cli');
66

77
const results = require('yargs')
8-
.parserConfiguration({"dot-notation":false})
8+
.parserConfiguration({'dot-notation':false})
99
.commandDir('./lib/cmds')
1010
.demandCommand()
1111
.help()

libraries/fabric-shim/test/unit/cli.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ const sinon = require('sinon');
2020

2121
const yargs = require('yargs');
2222

23+
const {execSync} = require('child_process');
24+
2325
describe('fabric-chaincode-node cli', () => {
2426
let sandbox;
2527

2628
beforeEach(() => {
29+
2730
sandbox = sinon.createSandbox();
2831
sandbox.stub(yargs, 'parserConfiguration').returns(yargs);
2932
sandbox.stub(yargs, 'commandDir').returns(yargs);
@@ -35,11 +38,15 @@ describe('fabric-chaincode-node cli', () => {
3538
sandbox.stub(yargs, 'version').returns(yargs);
3639

3740
sandbox.stub(process, 'exit');
41+
execSync('cp ./cli.js ./cli2.js', () => {});
42+
execSync('sed 1d ./cli2.js > ./cli.js', () => {});
3843
});
3944

4045
afterEach(() => {
4146
sandbox.restore();
4247
delete require.cache[require.resolve('../../cli.js')];
48+
execSync('rm ./cli.js', () => {});
49+
execSync('mv ./cli2.js ./cli.js', () => {});
4350
});
4451

4552
describe('Main test', () => {
@@ -68,7 +75,6 @@ describe('fabric-chaincode-node cli', () => {
6875
thePromise: Promise.resolve()
6976
}
7077
});
71-
7278
require('../../cli.js');
7379
});
7480

test/fv/annotations.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ describe('Typescript chaincode', () => {
1919

2020
before(async function () {
2121
this.timeout(LONG_STEP);
22-
2322
return utils.installAndInstantiate(suite);
2423
});
2524

0 commit comments

Comments
 (0)