Skip to content

Add support to paths with spaces in rust lang implementation #167

@Delanii

Description

@Delanii

I think I have hit upon a bug in rust lang support.
Compilation with PythonTeX on Windows fails when using rust command families (or rs in that regard) and if you have a space in path to .pytxcode file.

The error message I am getting is:

error: multiple input filenames provided (first two filenames are `Zaloha\Databaze\JazykAccessASQL\Poznamky\minted\<outputdir>\rust_default_default.exe` and `<outputdir>\rust_default_default.rs`)

If I remove the space in path (which is before "Zaloha"), and if there are no other spaces in filepath, error is gone.

I have looked into pythontex_engines.py and naively tryed to add quotations at line 1540 around {workingdir} and {file}.rs, but the error persists. If I use just very basic compilation with rustc compiler:

rustc C:\filepath\with space\file.rs

I get fully working binary. I am Rust newbie, just experimenting with Rust and PythonTeX, and Rust template for PythonTeX looks to me pretty complicated (or at least extensive).

How could this be fixed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions