Skip to content

Mandatory fields in node script #16

@lone-star

Description

@lone-star

TL;DR: When using in a node script, some options will be required, although they shouldn't be.

Explanation:

Script 1
Here is my script:

var options = {
    local_base: "base",
    remote_base: "http://localhost:1234/location",
    username: "admin",
    password: "admin",
}; 
var sync = webdavSync(options);  

When running I get:

■ [CONNECTION TEST]
/bin/sh: undefined: command not found

The program will exit as soon as there is a file to sync

Script 2
Here is my script:

var options = {
    local_base: "base",
    remote_base: "http://localhost:1234/location",
    username: "admin",
    password: "admin",
    curl: 'curl --insecure -s -S'
}; 
var sync = webdavSync(options);  

When running I get:

■ [CONNECTION TEST]

The program will exit as soon as there is a file to sync

.../lone-star/.../node_modules/webdav-sync/lib/webdav_sync.js:195
    return __indexOf.call(options.ignored, path) >= 0;

Script 3
Here is my script:

var options = {
    local_base: "base",
    remote_base: "http://localhost:1234/location",
    username: "admin",
    password: "admin",
    curl: 'curl --insecure -s -S',
    ignored: ''
}; 
var sync = webdavSync(options);  

When running I get:

■ [CONNECTION TEST]

The program will successfully sync.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions