Skip to content

Commit 6614fcc

Browse files
committed
Fix overrides for terminal scripting interception
1 parent 0963b02 commit 6614fcc

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@
118118
"@oclif/plugin-help",
119119
"@oclif/plugin-update",
120120
"registry-js",
121-
"win-version-info"
121+
"win-version-info",
122+
"global-agent",
123+
"global-tunnel-ng"
122124
],
123125
"update": {
124126
"s3": {

src/interceptors/terminal/terminal-env-overrides.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ import { HttpsPathOptions } from 'mockttp/dist/util/tls';
44

55
const PATH_VAR_SEPARATOR = process.platform === 'win32' ? ';' : ':';
66

7-
const OVERRIDES_DIR = path.join(__dirname, '..', '..', '..', 'overrides');
7+
const OVERRIDES_DIR = path.join(
8+
process.env.HTK_IS_BUNDLED
9+
? path.join(__dirname, '..')
10+
: path.join(__dirname, '..', '..', '..'),
11+
'overrides'
12+
);
813
const OVERRIDE_RUBYGEMS_PATH = path.join(OVERRIDES_DIR, 'gems');
914
const OVERRIDE_PYTHONPATH = path.join(OVERRIDES_DIR, 'pythonpath');
1015

webpack.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ module.exports = {
6363
include: OUTPUT_DIR,
6464
validate: true
6565
})
66-
: { apply: () => {} }
66+
: { apply: () => {} },
67+
// Used to e.g. fix the relative path to the overrides directory
68+
new webpack.EnvironmentPlugin({ HTK_IS_BUNDLED: true })
6769
],
6870
resolve: {
6971
extensions: [ '.tsx', '.ts', '.js' ]

0 commit comments

Comments
 (0)