Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert to older moveConfig that i guess silently failed in a good way #115

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"bluebird": "^3.4.1",
"clean-stacktrace": "^1.1.0",
"cli-truncate": "2.1.0",
"copy-dir": "^0.4.0",
"debug": "^4.3.4",
"delay": "^5",
"dockerfile-generator": "^5.0.0",
Expand Down
8 changes: 4 additions & 4 deletions utils/move-config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
'use strict';

const _ = require('lodash');
const copydir = require('copy-dir');
const fs = require('fs-extra');
const os = require('os');
const path = require('path');

module.exports = (src, dest = os.tmpdir()) => {
// Copy opts and filter out all js files
// We don't want to give the false impression that you can edit the JS
const filter = (src, dest) => path.extname(src) !== '.js';
const filter = (stat, filepath, filename) => (path.extname(filename) !== '.js');
// Ensure to exists
fs.mkdirSync(dest, {recursive: true});
// Try to copy the assets over
try {
// @todo: why doesn't the below work for PLD?
fs.copySync(src, dest, {filter});
// make any sh script executable
copydir.sync(src, dest, filter);
require('./make-executable')(_(fs.readdirSync(dest))
.filter(file => path.extname(file) === '.sh')
.value()
Expand All @@ -32,7 +32,7 @@ module.exports = (src, dest = os.tmpdir()) => {

// Try to take corrective action
fs.unlinkSync(f);
fs.copySync(src, dest, {filter});
copydir.sync(src, dest, filter);
require('./make-executable')(_(fs.readdirSync(dest))
.filter(file => path.extname(file) === '.sh')
.value()
Expand Down
Loading