1602 / 1602/compound

Console: change __dirname to expected __dirname

Offen Anfängerfreundlich
#643 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
1.6k
Forks
179
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Problem: when running `rw c` or `rw c "script"`, the `__dirname` is `/path/to/project/node_modules/compound/lib/server`.
Expected: `__dirname === /path/to/project`

Current workaround: `var dirname = './'`, since `./` points to the correct local dir.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Look at the console command implementation, likely in a file like `lib/server/console.js` or `lib/compound.js`. Find where `__dirname` is used or where the script execution context is set. The goal is to ensure the working directory for scripts run via `rw c` is the project root. Test by running a script that logs `__dirname`.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, node.js
Bereich
cli, tooling
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
65/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.