microsoft / azure-devops-extension-sample

Sample web extension for Azure DevOps
MIT License
239 stars 154 forks source link

Error: EISDIR illegal operation on a directory, open '{path}/{to}/{extension-dir}' #37

Open ExpressDead opened 5 years ago

ExpressDead commented 5 years ago

I'm running into an issue trying to use the recommended path to initialize an extension.

Each attempt at running tfx extension init results in error:

error: Error: Error unzipping /{path/azure-devops-extension-sample.zip: Error: EISDIR: illegal operation on a directory, open '/{path}/

While troubleshooting with the --trace-level=debug I noticed what appears to be a delete operation after the zipped source is downloaded, but before the unzip operation.

Downloading sample package from https://codeload.github.com/Microsoft/azure-devops-extension-sample/zip/master Package downloaded to {path}/azure-devops-extension-sample.zip (120 kB) 2019-08-27T22:37:44.600Z : Save file azure-devops-extension-sample-master/ 2019-08-27T22:37:44.602Z : Writing buffer for azure-devops-extension-sample-master/ 2019-08-27T22:37:44.602Z : Creating folder if it doesn't exist: {path} 2019-08-27T22:37:44.603Z : Save file azure-devops-extension-sample-master/.gitignore err: Error: EISDIR: illegal operation on a directory, open '{path}/' 2019-08-27T22:37:44.604Z : Deleting contents of {path} 2019-08-27T22:37:44.604Z : Writing buffer for azure-devops-extension-sample-master/.gitignore 2019-08-27T22:37:44.604Z : Creating folder if it doesn't exist: {path} 2019-08-27T22:37:44.605Z : Error: Error unzipping {path}/azure-devops-extension-sample.zip: Error: EISDIR: illegal operation on a directory, open '{path}/' 2019-08-27T22:37:44.605Z : at ExtensionInit.<anonymous> (/usr/local/lib/node_modules/tfx-cli/_build/exec/extension/init.js:311:31) 2019-08-27T22:37:44.605Z : at step (/usr/local/lib/node_modules/tfx-cli/_build/exec/extension/init.js:45:23) 2019-08-27T22:37:44.605Z : at Object.next (/usr/local/lib/node_modules/tfx-cli/_build/exec/extension/init.js:26:53) 2019-08-27T22:37:44.605Z : at fulfilled (/usr/local/lib/node_modules/tfx-cli/_build/exec/extension/init.js:17:58)

ExpressDead commented 5 years ago

My interpretation could be off and the zip not being successfully created to begin. I have tried this on multiple systems (OSx & Ubuntu) with the same results on both. For the additional background, I've confirmed that directory permissions don't seem to be causing the issue and attempted the operation with sudo permissions with the same results.

raygerrard commented 4 years ago

I am also running into this issue when trying to run the extension init command on OSX.

StylesGumede commented 4 years ago

So this issue has not been resolved?

lukerider commented 3 years ago

Any update on this? I'm getting the same error.

nathankitchen commented 3 years ago

Same error - can't seem to use "extension create" either.

nbuuck commented 3 years ago

Another contributor has opened a PR to fix this: https://github.com/microsoft/tfs-cli/pull/367