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

[Bug] Incorrect command argument in Introduction to Atlas Migrations documentation #2610

Closed
Pante opened this issue Mar 13, 2024 · 4 comments

Comments

@Pante
Copy link

Pante commented Mar 13, 2024

I'm currently experiencing an issue when following the versioned migration guide, https://atlasgo.io/versioned/intro#creating-the-first-migration on v0.19.3-2d83466-canary, Windows.

Running the command stated in the docs:

atlas migrate diff initial --to file://schema.sql --dev-url "docker://postgres/15/dev?search_path=public" --format '{{ sql . "  " }}

Yields:

Error: accepts at most 1 arg(s), received 2

After further digging, it seems like --format '{{ sql . " " }} is causing the issue. Removing " " seems to solve the issue but I don't think has the same indentation. On another note, the error message is extremely vague and took me awhile to figure out what was the exact issue. Perhaps it could be tweaked?

@masseelch
Copy link
Member

I think quoting in windows works different from unix systems. If I remember correctly in windows ^ is the escape char. Can you try:

--format '{{ sql . ^" ^" }} instead?

@Pante
Copy link
Author

Pante commented Mar 13, 2024

I think quoting in windows works different from unix systems. If I remember correctly in windows ^ is the escape char. Can you try:

--format '{{ sql . ^" ^" }} instead?

I tried ^ and ``` but neither works.

@giautm
Copy link
Member

giautm commented Mar 14, 2024

--format "{{ sql . \" \" }}"

@Pante please use this format instead

@Pante
Copy link
Author

Pante commented Mar 14, 2024

--format "{{ sql . \" \" }}"

@Pante please use this format instead

Thanks, I tweaked it slightly to use single quotes instead, --format '{{ sql . \" \" }}', and it works!

@Pante Pante closed this as completed Mar 14, 2024
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

3 participants