utils -> strings

This commit is contained in:
Domen Kožar 2019-10-03 13:20:25 +02:00
commit cea7883cb2
No known key found for this signature in database
GPG key ID: C2FFBCAFD2C24246
5 changed files with 5 additions and 5 deletions

View file

@ -1,4 +1,4 @@
import {extrasperse, saneSplit} from '../src/utils'
import {extrasperse, saneSplit} from '../src/strings'
test('extrasperse', async() => {
expect(extrasperse('-A', ["foo", "bar"])).toEqual(["-A", "foo", "-A", "bar"]);

View file

@ -18,7 +18,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(require("@actions/core"));
const exec = __importStar(require("@actions/exec"));
const utils_1 = require("./utils");
const strings_1 = require("./strings");
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
@ -50,11 +50,11 @@ function run() {
},
}
};
const args = utils_1.extrasperse('-A', utils_1.saneSplit(attributes, /\s/)).concat([file || "default.nix"]);
const args = strings_1.extrasperse('-A', strings_1.saneSplit(attributes, /\s/)).concat([file || "default.nix"]);
yield exec.exec('nix-build', args, options);
core.endGroup();
core.startGroup(`Cachix: pushing to ` + push);
yield exec.exec('cachix', ['push', push].concat(utils_1.saneSplit(paths, /\s/).join(' ')));
yield exec.exec('cachix', ['push', push].concat(strings_1.saneSplit(paths, /\s/).join(' ')));
core.endGroup();
}
catch (error) {

View file

@ -1,6 +1,6 @@
import * as core from '@actions/core';
import * as exec from '@actions/exec';
import {extrasperse, saneSplit} from './utils';
import {extrasperse, saneSplit} from './strings';
async function run() {
try {