@tanagram/cli 0.1.19 → 0.1.20

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.
Files changed (2) hide show
  1. package/install.js +10 -3
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -24,9 +24,16 @@ async function buildWithGoBin() {
24
24
  console.log('📦 Installing Go compiler via npm...');
25
25
 
26
26
  try {
27
- // Install Go using go-bin (resolve from parent node_modules)
28
- const goBinPath = path.join(__dirname, '..', 'go-bin');
29
- const goBin = require(goBinPath);
27
+ // Install Go using go-bin
28
+ // Use require.resolve to find go-bin in node_modules
29
+ let goBin;
30
+ try {
31
+ goBin = require('go-bin');
32
+ } catch (err) {
33
+ // Fallback: try to require from parent node_modules
34
+ const parentPath = path.join(__dirname, '..', '..', 'go-bin');
35
+ goBin = require(parentPath);
36
+ }
30
37
  const goDir = await goBin({ version: GO_VERSION, dir: __dirname });
31
38
  const goPath = path.join(goDir, 'bin', 'go');
32
39
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanagram/cli",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "Tanagram - Catch sloppy code before it ships",
5
5
  "main": "index.js",
6
6
  "bin": {