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

Too many targets when running v script (.vsh) file #19473

Closed
omerrob opened this issue Sep 29, 2023 · 2 comments
Closed

Too many targets when running v script (.vsh) file #19473

omerrob opened this issue Sep 29, 2023 · 2 comments
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@omerrob
Copy link
Contributor

omerrob commented Sep 29, 2023

Describe the bug

When running a vsh file where one of the options is a file I get:

$ v my-script.vsh --opt fliename.txt 
Too many targets. Specify just one target: <target.v|target_directory>.

if I just build:

$ v my-script.vsh

And then run:

./my-script.vsh --opt fliename.txt 

It runs fine.

Since v script files are intended to run similarly to shell scripts and shell scripts often accept files as options, I think this was unintentional.

Reproduction Steps

$ touch my-script.vsh
$ touch filename.txt
$ v my-script.vsh --opt filename.txt
Too many targets. Specify just one target: <target.v|target_directory>.

Expected Behavior

v to build and run the script with filename.txt as the value of --opt

Current Behavior

Produces Too many targets. Specify just one target: <target.v|target_directory>.

Possible Solution

No response

Additional Information/Context

No response

V version

0.4.1 137cb09.1476daf

Environment details (OS name and version, etc.)

V full version: V 0.4.1 137cb09.1476daf
OS: macos, macOS, 13.4.1, 22F770820d
Processor: 16 cpus, 64bit, little endian, Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz

CC version: Apple clang version 12.0.5 (clang-1205.0.22.9)
thirdparty/tcc status: thirdparty-macos-amd64 46662e2

Note

You can vote for this issue using the 👍 reaction. More votes increase the issue's priority for developers.

Take into account that only the 👍 reaction counts as a vote.
Only reactions to the issue itself will be counted as votes, not comments.

@omerrob omerrob added the Bug This tag is applied to issues which reports bugs. label Sep 29, 2023
@lv37
Copy link
Contributor

lv37 commented Sep 29, 2023

I think you're supposed to do v run my-script.vsh --opt fliename.txt

@omerrob
Copy link
Contributor Author

omerrob commented Sep 29, 2023

Oh, I see. Yes. It's working for me this way.

Will close it, then. Thanks.

@omerrob omerrob closed this as completed Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

No branches or pull requests

2 participants