mirror of
https://codeberg.org/icewind/attic-action.git
synced 2026-06-03 17:44:07 +02:00
utils -> strings
This commit is contained in:
parent
5a70a5cca3
commit
cea7883cb2
5 changed files with 5 additions and 5 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import {extrasperse, saneSplit} from '../src/utils'
|
import {extrasperse, saneSplit} from '../src/strings'
|
||||||
|
|
||||||
test('extrasperse', async() => {
|
test('extrasperse', async() => {
|
||||||
expect(extrasperse('-A', ["foo", "bar"])).toEqual(["-A", "foo", "-A", "bar"]);
|
expect(extrasperse('-A', ["foo", "bar"])).toEqual(["-A", "foo", "-A", "bar"]);
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
const exec = __importStar(require("@actions/exec"));
|
const exec = __importStar(require("@actions/exec"));
|
||||||
const utils_1 = require("./utils");
|
const strings_1 = require("./strings");
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
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);
|
yield exec.exec('nix-build', args, options);
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
core.startGroup(`Cachix: pushing to ` + push);
|
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();
|
core.endGroup();
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as exec from '@actions/exec';
|
import * as exec from '@actions/exec';
|
||||||
import {extrasperse, saneSplit} from './utils';
|
import {extrasperse, saneSplit} from './strings';
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue