Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ncodi.Cli cannot find a file #57

Closed
LyesSaadi opened this issue Jul 20, 2021 · 4 comments
Closed

Ncodi.Cli cannot find a file #57

LyesSaadi opened this issue Jul 20, 2021 · 4 comments

Comments

@LyesSaadi
Copy link

Well, I'm on an issue reporting craze, it seems :P !

So, as per your request in #54, I tried Ncodi.Cli to compile a file (in #55 I used nc.sh), and it is unable to find a file whatever is the length I go on to precise it:

❯ ./src/Ncodi.Cli/bin/Debug/netcoreapp3.1/Ncodi.Cli run test.nc 
Error: file 'test.nc' not found here

Ncodi on  master [?] 
❯ ./src/Ncodi.Cli/bin/Debug/netcoreapp3.1/Ncodi.Cli run
The path field is required.
Specify --help for a list of available options and commands.

Ncodi on  master [?] 
❯ ls
addpath.cmd  ascii-logo.txt  icon-05.png  LICENSE  nc.cmd  nc.sh  README.md  samples  src  test.nc

Ncodi on  master [?] 
❯ mv test.nc ./src/Ncodi.Cli/bin/Debug/netcoreapp3.1/

Ncodi on  master 
❯ ./src/Ncodi.Cli/bin/Debug/netcoreapp3.1/Ncodi.Cli run test.nc
Error: file 'test.nc' not found here

Ncodi on  master 
❯ ./src/Ncodi.Cli/bin/Debug/netcoreapp3.1/Ncodi.Cli

 __    __                            __  __ 
|  \  |  \      By Aziz Amari       |  \|  \
| $$\ | $$  _______   ______    ____| $$ \$$
| $$$\| $$ /       \ /      \  /      $$|  \
| $$$$\ $$|  $$$$$$$|  $$$$$$\|  $$$$$$$| $$
| $$\$$ $$| $$      | $$  | $$| $$  | $$| $$
| $$ \$$$$| $$_____ | $$__/ $$| $$__| $$| $$
| $$  \$$$ \$$     \ \$$    $$ \$$    $$| $$
 \$$   \$$  \$$$$$$$  \$$$$$$   \$$$$$$$ \$$ 
            

Command line interface to run ncodi files

Usage: ncodi [command] [options]

Options:
  -?|-h|--help  Show help information.

Commands:
  run           
  shell         

Run 'ncodi [command] -?|-h|--help' for more information about a command.


Ncodi on  master 
❯ ./src/Ncodi.Cli/bin/Debug/netcoreapp3.1/Ncodi.Cli run /var/home/lyes/.opt/Ncodi/src/Ncodi.Cli/bin/Debug/netcoreapp3.1/test.nc
Error: file '/var/home/lyes/.opt/Ncodi/src/Ncodi.Cli/bin/Debug/netcoreapp3.1/test.nc' not found here

Ncodi on  master 
❯ cat /var/home/lyes/.opt/Ncodi/src/Ncodi.Cli/bin/Debug/netcoreapp3.1/test.nc
ekteb("Hello, World!")
@azizamari
Copy link
Owner

Rename the file to test.ncodi not test.nc

@azizamari
Copy link
Owner

Did it work this time or should i expect issue 58 soon ?

@LyesSaadi
Copy link
Author

Indeed, it now works, though I find it a bit weird to do it that way when we specify the extension ^^!

@azizamari
Copy link
Owner

azizamari commented Jul 20, 2021

Well it's fixable in one line since the file extension doesn't really matter for now I simply have to stop using the AddFileExtention method in this file (at the end of the file) because it automatically tries to add the extension .ncodi if not provided such that these commands become identical "run file" and "run file.ncodi" https://github.com/azizamari/Ncodi/blob/master/src/Ncodi.Cli/Program.cs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants