tune-basic-toolset 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tune-basic-toolset",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Basic toolset for tune",
5
5
  "main": "src/index.js",
6
6
  "files": [
package/src/patch.tool.js CHANGED
@@ -17,7 +17,7 @@ module.exports = async function patch({ text, filename }, ctx) {
17
17
  }
18
18
 
19
19
  if (patches.length === 0) {
20
- throw new Error("No valid patch segments found");
20
+ return "No valid patch segments found";
21
21
  }
22
22
 
23
23
  let fileContent = await ctx.read(filename);
@@ -35,4 +35,4 @@ module.exports = async function patch({ text, filename }, ctx) {
35
35
 
36
36
  await ctx.write(filename, fileContent);
37
37
  return "patched";
38
- };
38
+ };
package/src/shp.proc.js CHANGED
@@ -12,7 +12,7 @@ const shp = async (node, args, ctx) => ({
12
12
  let result;
13
13
  try {
14
14
  if (input !== null) {
15
- const res = spawnSync(args.trim(), {
15
+ const res = spawnSync(args.trim() || "sh", {
16
16
  input,
17
17
  encoding: 'utf8',
18
18
  shell: true
@@ -28,4 +28,4 @@ const shp = async (node, args, ctx) => ({
28
28
  }
29
29
  });
30
30
 
31
- module.exports = shp;
31
+ module.exports = shp;