Closed ludalex closed 7 years ago
I've just run into this as well. I don't think simple-git is the real problem. 1.59.0 adds an exists
test that fails, but this is apparently because the following method in ember-cli-deploy-revision-data/index.js
_getScmData: function() {
var ScmDataGenerator = this.readConfig('scm');
if (ScmDataGenerator) {
return new ScmDataGenerator({
plugin: this
}).generate();
} else {
return Promise.resolve();
}
}
instantiates ScmDataGenerator
with {plugin: this}
, but the init()
method in lib/scm-data-generators/git.js
wrongly (I believe) uses that to set its path
property:
init: function(path) {
this._super();
this.path = path;
}
When ScmDataGenerator
's generate()
method is called, that path
gets passed to simpleGit()
and the error "TypeError: path must be a string" happens because {plugin: this}
is not a string.
Ahh so you think it was failing silently before? Makes more sense, I was struggling to understand how that could ever have been a path... May I suggest using 1.57 for now to not break code that depends on this project, but then opening a fork/branch to fix the path used in ScmDataGenerator?
@ludalex @MarkMT @josephroffey I've submitted #45 with a fix for this by passing the context.distDir
string to the ScmDataGenerator
initializer. Can you try it out and chime in if it fixes this error for you as well (or doesn't)?
@kpfefferle I just deployed something using your branch and it worked as a drop-in replacement
Thanks, works perfectly here.
will close the issue then, thanks again @kpfefferle for the fix, and sorry for the trouble guys
I have been getting this error lately:
The culprit is the latest version of the package
simple-git@1.59.0
. If I pin it to1.57.0
in mypackage.json
it works again.