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

Trying to import after creating a post shows wrong info. #3731

Open
StyXman opened this issue Jan 6, 2024 · 0 comments
Open

Trying to import after creating a post shows wrong info. #3731

StyXman opened this issue Jan 6, 2024 · 0 comments
Labels

Comments

@StyXman
Copy link
Contributor

StyXman commented Jan 6, 2024

Environment

Python Version:
Python 3.11.7

Nikola Version:
Nikola v8.2.4

Operating System:
Debian Unstable

Description:

I first do:

(venv) mdione@ioniq:~/src/projects/glob/nikola$ nikola new_post
Creating New Post
-----------------

Title: Debugging docker containers with the host's tools
Scanning posts.........done!
[2024-01-06 11:34:46] INFO: new_post: Your post's text is at: posts/debugging-docker-containers-with-the-hosts-tools.rst

So far so good. Later I realize that rst is not the format I want and that I can --import the file I'm already writing. So I try:

(venv) mdione@ioniq:~/src/projects/glob/nikola$ nikola new_post --title "Debugging docker containers with the host's tools" -2 --import posts/debugging-docker-containers-with-the-hosts-tools.md 
Importing Existing Post
-----------------------

Title: Debugging docker containers with the host's tools
Scanning posts.........done!
[2024-01-06 11:38:14] ERROR: new_post: The title already exists!
[2024-01-06 11:38:14] INFO: new_post: Existing post's text is at: posts/debugging-docker-containers-with-the-hosts-tools.md
[2024-01-06 11:38:14] INFO: new_post: Existing post's metadata is at: posts/debugging-docker-containers-with-the-hosts-tools.meta

My issue is not that I get an error, that's fine. My issue is that it reports that a metadata file was created while in fact it wasn't:

(venv) mdione@ioniq:~/src/projects/glob/nikola$ cat posts/debugging-docker-containers-with-the-hosts-tools.meta
cat: posts/debugging-docker-containers-with-the-hosts-tools.meta: No such file or directory

Maybe it should bail out before reporting it?

@StyXman StyXman added the bug label Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant