Azure / InnovationEngine

An experiment in simplicity for complex environments
MIT License
30 stars 14 forks source link

Consider generating log file if --log-file flag is specified or on failure #153

Open mqasimsarfraz opened 6 months ago

mqasimsarfraz commented 6 months ago

Currently when running ie the log file ie.log is generated always irrespective of end result. This works great while user is adding support for ie in a new document but not that useful if we know the execution will be successful. Perhaps it would make sense to only write ie.log in case the execution fails, or user explicitly requests by a flag like --log-file.

→ ie execute tutorial.md 
Welcome to the innovation Engine Tutorial
1. Running simple bash commands

  ✔ export VAR="Hello World"

  ✔ echo $VAR

  Hello World

2. Test Code block with expected output

  ✔ echo "Hello \
    world"

  Hello world

3. Test Code block matches expected regex

  ✔ echo "Foo Bar"

  Foo Bar

→ ls -la | grep ie.log
-rw-rw-r--  1 qasim qasim  2331 Dez  6 16:16 ie.log