File tree Expand file tree Collapse file tree
src/org/netbeans/modules/php/wordpress Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8181 */
8282public final class WordPressCli {
8383
84- public static String NAME = "wp" ; // NOI18N
85- public static String LONG_NAME = "wp-cli.phar" ; // NOI18N
84+ public static final String NAME = "wp" ; // NOI18N
85+ public static final String LONG_NAME = "wp-cli.phar" ; // NOI18N
86+ public static final String NAME_BAT = "wp.bat" ; // NOI18N
8687
8788 private final String wpCliPath ;
8889 private boolean noReset = false ;
Original file line number Diff line number Diff line change 5555import javax .swing .event .DocumentEvent ;
5656import javax .swing .event .DocumentListener ;
5757import org .netbeans .api .progress .ProgressHandle ;
58- import org .netbeans .api .progress .ProgressHandleFactory ;
5958import org .netbeans .modules .php .api .executable .InvalidPhpExecutableException ;
6059import org .netbeans .modules .php .api .util .FileUtils ;
6160import org .netbeans .modules .php .api .util .StringUtils ;
6968import org .openide .util .Exceptions ;
7069import org .openide .util .NbBundle ;
7170import org .openide .util .RequestProcessor ;
71+ import org .openide .util .Utilities ;
7272
7373final class WordPressOptionsPanel extends javax .swing .JPanel {
7474
@@ -537,6 +537,9 @@ private void wpCliSearchButtonActionPerformed(java.awt.event.ActionEvent evt) {/
537537 String script = UiUtils .SearchWindow .search (new UiUtils .SearchWindow .SearchWindowSupport () {
538538 @ Override
539539 public List <String > detect () {
540+ if (Utilities .isWindows ()) {
541+ return FileUtils .findFileOnUsersPath (WordPressCli .NAME , WordPressCli .LONG_NAME , WordPressCli .NAME_BAT );
542+ }
540543 return FileUtils .findFileOnUsersPath (WordPressCli .NAME , WordPressCli .LONG_NAME );
541544 }
542545
You can’t perform that action at this time.
0 commit comments