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

Process fails while removing temporary files in Windows #4

Closed
mddanishansari opened this issue Sep 6, 2021 · 3 comments
Closed

Process fails while removing temporary files in Windows #4

mddanishansari opened this issue Sep 6, 2021 · 3 comments

Comments

@mddanishansari
Copy link
Contributor

mddanishansari commented Sep 6, 2021

The project is created successfully but the create-compose-app command fails at Removing temp files... step

It happens for all the template

Command line log:

? Initializing...
??  Downloading template...
? Unzipping...
? Preparing source and test files (1/2) ...
? Verifying file contents (2/2) ...
??  Removing temp files...
Exception in thread "main" java.nio.file.FileSystemException: C:\path\to\compose-chrome-extension-template.zip: The process cannot access the file because it is being used by another process.

        at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
        at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:274)
        at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
        at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)
        at com.github.theapache64.corvetee.Corvette.start(Corvette.kt:147)
        at com.github.theapache64.corvetee.Corvette.start$default(Corvette.kt:55)
        at com.theapache64.createcomposeapp.MainKt.createChromeExtensionApp(Main.kt:119)
        at com.theapache64.createcomposeapp.MainKt.main(Main.kt:47)
@mddanishansari
Copy link
Contributor Author

mddanishansari commented Sep 6, 2021

I think the outputFile needs to be closed by close() before call to outputFile.deleteIfExists()

@theapache64
Copy link
Owner

@mddanishansari It looks like you're on Windows. I haven't tested the program in it. Is there any way you can try the above-mentioned fix by cloning the repo? I'd be happy to merge the PR if you want.

@mddanishansari
Copy link
Contributor Author

Ignore the above comments, Dunno why I thought files needs to be closed before deleting. Seems like outputFile is used by some other process at the time of deletion. But can't figure out by whom.

Gimme some time to figure out.

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