danielyaa5 / puml-for-markdown

A CLI tool to embed interactive PUML diagrams to your github markdown files.
MIT License
296 stars 62 forks source link

.gitignore is required #4

Closed skrach closed 2 years ago

skrach commented 2 years ago

It seems the software currently requires the existence of a .gitignore file:

Running puml-for-markdown yields:

FATAL EXCEPTION
Error: ENOENT: no such file or directory, open '/Users/dsk/FT/test/.gitignore'
    at Object.openSync (node:fs:599:3)
    at Object.readFileSync (node:fs:467:35)
    at parse (/usr/local/lib/node_modules/puml-for-markdown/node_modules/gitignore-globs/index.js:65:22)
    at runOnce (/usr/local/lib/node_modules/puml-for-markdown/index.js:208:39)
    at run (/usr/local/lib/node_modules/puml-for-markdown/index.js:230:69)
    at Command.<anonymous> (/usr/local/lib/node_modules/puml-for-markdown/bin/index.js:81:16)
    at Command.listener [as _actionHandler] (/usr/local/lib/node_modules/puml-for-markdown/node_modules/commander/lib/command.js:488:17)
    at /usr/local/lib/node_modules/puml-for-markdown/node_modules/commander/lib/command.js:1207:65
    at Command._chainOrCall (/usr/local/lib/node_modules/puml-for-markdown/node_modules/commander/lib/command.js:1124:12)
    at Command._parseCommand (/usr/local/lib/node_modules/puml-for-markdown/node_modules/commander/lib/command.js:1207:27)
    at Command.parse (/usr/local/lib/node_modules/puml-for-markdown/node_modules/commander/lib/command.js:878:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/puml-for-markdown/bin/index.js:86:6)
    at Module._compile (node:internal/modules/cjs/loader:1112:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1166:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:834:12) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/Users/dsk/FT/test/.gitignore'
}

Since a repository doesn't need a .gitignore to function properly, i think this software should cope with that.

danielyaa5 commented 2 years ago

Fixed in 1.2.1 https://github.com/danielyaa5/puml-for-markdown/pull/7

danielyaa5 commented 2 years ago

@skrach

danielyaa5 commented 2 years ago

Let me know if it still broken