[NPMCLI-34] Command 'create-light-module' cannot handle absolute path Created: 19/Jul/16  Updated: 22/Aug/16  Resolved: 20/Jul/16

Status: Closed
Project: Magnolia CLI
Component/s: None
Affects Version/s: None
Fix Version/s: 0.0.1

Type: Bug Priority: Major
Reporter: Christoph Meier Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 4.5h
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: Basel 53
Story Points: 1

 Description   

When using the command create-light-module with the -p option, it fails, if the path is absolute.

(-p works fine for the other commands with both relative and absolute paths).

cmeier@chmsLittleMacBookPro ~/tmp/mgnl-cli-tests $ mgnl create-light-module yyy -p /Users/cmeier/tmp/mgnl-cli-tests/
undefined
/usr/local/lib/node_modules/@magnolia/cli/bin/mgnl-create-light-module.js:19
  if (e.displayHelp) {
       ^

TypeError: Cannot read property 'displayHelp' of undefined
    at Object.<anonymous> (/usr/local/lib/node_modules/@magnolia/cli/bin/mgnl-create-light-module.js:19:8)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:968:3
cmeier@chmsLittleMacBookPro ~/tmp/mgnl-cli-tests $

The remaining question:
p will be the parent directory of the new light module right? (Or the directory of the new module itself?)



 Comments   
Comment by Federico Grilli [ 20/Jul/16 ]

To answer you question: yes --path points to the parent folder of the light module whose name is passed as the first argument to create-light-module

Generated at Mon Feb 12 04:45:53 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.