mirror of
https://github.com/diligencia/semantic-branch-version.git
synced 2024-11-23 09:43:50 +08:00
Improve the exec call
This commit is contained in:
parent
e76ec1aae8
commit
fbd3dd9e5c
18
index.js
18
index.js
@ -1,16 +1,16 @@
|
||||
const core = require('@actions/core');
|
||||
const exec = require('@actions/exec');
|
||||
const execlib = require('@actions/exec');
|
||||
|
||||
try {
|
||||
const options ={};
|
||||
let output = '';
|
||||
options.listeners = {
|
||||
stdout: (data) => {
|
||||
output += data.toString();
|
||||
}
|
||||
}
|
||||
exec('git', 'branch', options)
|
||||
const options = {
|
||||
listeners: {
|
||||
stdout: (data) => output += data.toString()
|
||||
}
|
||||
};
|
||||
|
||||
execlib.exec('git', ['branch'], options)
|
||||
core.setOutput("branchname", output);
|
||||
} catch (errror) {
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
Loading…
Reference in New Issue
Block a user