Skip to content

ERROR at line 1: Unknown command '\-'. When trying to import with - #254

Closed as not planned
@nextgenthemes

Description

@nextgenthemes

Bug Report

Describe the current, buggy behavior

I have been using this command in a script for years. No idea WTF is happening, I need to - to pipe a local file to the remote.

wp @dev db import - < /tmp/ngt.sql
ERROR at line 1: Unknown command '\-'.

Export works perfectly fine wp @prod db export - > "$sql_file"

Describe what you would expect as the correct outcome

No error, like it always did.

Let us know what environment you are running this on

OS:	Linux 5.15.0-83-generic #92-Ubuntu SMP Mon Aug 14 09:30:42 UTC 2023 x86_64
Shell:	/bin/bash
PHP binary:	/usr/bin/php8.1
PHP version:	8.1.27
php.ini used:	/etc/php/8.1/cli/php.ini
MySQL binary:	/usr/bin/mysql
MySQL version:	mysql  Ver 15.1 Distrib 10.6.17-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper
SQL modes:	
WP-CLI root dir:	phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:	phar://wp-cli.phar/vendor
WP_CLI phar path:	/home/vagrant
WP-CLI packages dir:	
WP-CLI cache dir:	/home/vagrant/.wp-cli/cache
WP-CLI global config:	
WP-CLI project config:	
WP-CLI version:	2.9.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions