grunt-prompt icon indicating copy to clipboard operation
grunt-prompt copied to clipboard

Strange behavior for prompts

Open mwmwmw opened this issue 9 years ago • 0 comments

I had an old version of prompt that I recently updated. After updating, the prompt started acting strangely. It still works as intended but outputs some strangeness to the console.

https://www.dropbox.com/s/a34ks345hy7cspu/2016-02-12%2011_54_58-Trajectory20Client%20-%20%5BF__Dropbox%20%28Personal%29_Dev_Trajectory20Client%5D%20-%20..._gruntf.png?dl=0

It seems to loop through the string re-asking the question one letter at a time until it gets to the end of the string. The value set in the config at the end is always the full string (hence this being more of a cosmetics issue than anything).

The code is dead simple so I assume this is cause by some change made to prompt that I'm just not seeing.

ViewName: {
    options: {
        questions: [
            {
                config: 'ViewFolder', 
                type: 'input', 
                message: 'The folder for your view: js/views/', 
                default: 'default',
                validate: function (value) {
                    return typeof value === "string";
                }, 
                filter: function (value) {
                    return value;
                }
            },{
                config: 'ViewName',
                type: 'input', 
                message: 'The filename of your view: js/views/',
                default: 'default', 
                validate: function (value) {
                    return typeof value === "string";
                },
                filter: function (value) {
                    return value.toString();
                } 
            }
        ]
    }
}

Just need a pointer in the right direction. Thanks.

mwmwmw avatar Feb 12 '16 19:02 mwmwmw