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

Netbeans output window #59

Open
Alpine418 opened this issue Apr 4, 2018 · 8 comments
Open

Netbeans output window #59

Alpine418 opened this issue Apr 4, 2018 · 8 comments

Comments

@Alpine418
Copy link

Strange behaviour in Netbeans output window: The input line for the answer appears first. After entering the anwser, the question of the prompt appears as second line. But the order should actually be reversed. In Powershell the order of the two lines is correct (first the question, second the input).

@Alpine418
Copy link
Author

Alpine418 commented Apr 4, 2018

Here an example of the Netbeans output window:

"C:\Users\John Doe\AppData\Roaming\npm\gulp.cmd" "update:fetchFromGit" "--color"
[07:16:17] Using gulpfile C:\dev\gulpfile.js
[07:16:17] Starting 'update:fetchFromGit'...
1.0.0
? From which last commit or tag would you like to checkout? 1.0.0
[07:16:26] Finished 'update:fetchFromGit' after 8.6 s
Done.

@Alpine418
Copy link
Author

Alpine418 commented Apr 4, 2018

And here the gulp task.

gulp.task('update:fetchFromGit', function () {
    var tag = '';
    return gulp
            .src('./install', {read: false})
            .pipe(prompt.prompt({
                type: 'input',
                name: 'tag',
                message: 'From which last commit or tag would you like to checkout?'
            }, function (res) {
                tag = res.tag;
            }))
            .pipe(run('git checkout-index -f --prefix="<%= file.path %>/" $(git diff --name-only ' + tag + ')', {
                usePowerShell: true,
                verbosity: 0
            }));
});

@shannonlal
Copy link
Collaborator

@RjGAmer Is this issue only on Windows? Does it only happen in netbeans? If you use the command line does it happen? I currently have access to a Mac so it is difficult to reproduce. I am jut trying to narrow down what the environment I need to find to reproduce this.

@Alpine418
Copy link
Author

Alpine418 commented Apr 10, 2018

The issue happens on Windows 10 x64 in Netbeans 8.2, running with Java 8 (jdk1.8.0_101).

I've separated the prompt und Git fetching to separate tasks, but got the similar problem that the question is displayed after I've entered the anwser. Here is my current prompt task:

// Last commit or tag
var tag = '';

// Show prompt to get last commit or tag for checkout
gulp.task('update:_getTagForGit', function () {
    return gulp
            .src('./temp/update/install')
            .pipe(prompt.prompt({
                type: 'input',
                name: 'tag',
                message: 'From which last commit or tag would you like to checkout?'
            }, function (res) {
                tag = res.tag;
            }));
});

@shannonlal
Copy link
Collaborator

Just a question to confirm. If you run this gulp taks from the command line (i.e. on your Windows 10 computer and not in Netbeans) does it work?

@Alpine418
Copy link
Author

Correct. The prompt is working correctly from the PowerShell and command line tool.

@Alpine418
Copy link
Author

Could you reproduce my "problem"?

@shannonlal
Copy link
Collaborator

@RjGAmer I haven't had a chance to get a windows machine. It seems to be a problem on netbeans console because gulp-prompt seems to work fine on Mac, Linux and Windows. You can maybe try verifying the node version to see if there is something weird going on there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants