ppackage 2.3.1 → 2.3.4
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/.eslintrc +0 -0
- package/bin/askpass +1 -1
- package/index.js +4 -3
- package/package.json +1 -1
package/.eslintrc
CHANGED
|
File without changes
|
package/bin/askpass
CHANGED
package/index.js
CHANGED
|
@@ -8,6 +8,7 @@ const {spawn} = require('child_process');
|
|
|
8
8
|
const args = require('nyks/process/parseArgs')();
|
|
9
9
|
const passthru = require('nyks/child_process/passthru');
|
|
10
10
|
const wait = require('nyks/child_process/wait');
|
|
11
|
+
const trim = require('mout/string/trim');
|
|
11
12
|
|
|
12
13
|
const Dockerfile = require('./lib/dockerfile');
|
|
13
14
|
const {Parser, Composer} = require('yaml');
|
|
@@ -163,7 +164,7 @@ class ppackage {
|
|
|
163
164
|
await passthru("git", ["reset", "HEAD", "--", "."]);
|
|
164
165
|
|
|
165
166
|
for(let line of [GITIGNORE_PATH, DOCKERIGNORE_PATH, NPMIGNORE_PATH])
|
|
166
|
-
await passthru("git", ["
|
|
167
|
+
await passthru("git", ["checkout", "--", line]).catch(()=>{});
|
|
167
168
|
|
|
168
169
|
let restore = [];
|
|
169
170
|
if(fs.existsSync(DOCKERIGNORE_PATH)) {
|
|
@@ -174,10 +175,10 @@ class ppackage {
|
|
|
174
175
|
let ignore = fs.readFileSync(NPMIGNORE_PATH, 'utf8');
|
|
175
176
|
restore.push(...ignore.split("\n"));
|
|
176
177
|
}
|
|
177
|
-
restore = restore.map(v => v.trim()).filter(v => v && v[0] != "#");
|
|
178
|
+
restore = restore.map(v => trim(v.trim(), '/')).filter(v => v && v[0] != "#");
|
|
178
179
|
|
|
179
180
|
for(let line of restore)
|
|
180
|
-
await passthru("git", ["
|
|
181
|
+
await passthru("git", ["checkout", "--", line]).catch(()=>{});
|
|
181
182
|
}
|
|
182
183
|
|
|
183
184
|
|